Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
Add date to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
cifren committed Feb 26, 2020
1 parent 345502f commit cbd8d48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ghyt/core/handler/webhook.go
@@ -1,6 +1,7 @@
package handler
import (
"fmt"
"time"
"gopkg.in/go-playground/webhooks.v5/github"
"github.com/kataras/iris"
"github.com/fatih/structs"
Expand Down Expand Up @@ -34,6 +35,7 @@ func GhWebhookHandler(ctx iris.Context, container Container) {
}

jobLogEntity := JobLog{
CreatedAt: time.Now(),
Request: structs.Map(payload),
ErrorMessage: errMessage,
Feedback: feedbacks,
Expand Down
5 changes: 5 additions & 0 deletions ghyt/core/job/job_log.go
@@ -1,6 +1,11 @@
package job

import (
"time"
)

type JobLog struct {
CreatedAt time.Time `json:"created_at"`
Request map[string]interface{} `json:"request"`
Feedback []JobFeedback `json:"feedback"`
ErrorMessage string `json:"error_message"`
Expand Down

0 comments on commit cbd8d48

Please sign in to comment.