Skip to content

Commit

Permalink
versionup slog refs #10
Browse files Browse the repository at this point in the history
  • Loading branch information
sinmetal committed Jul 11, 2019
1 parent 177bf33 commit 6212f54
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/morikuni/failure v0.11.0
github.com/sinmetal/gcpmetadata v0.0.0-20190612100641-8951dfda8549
github.com/sinmetal/silverdog v0.0.0-20190709122325-a885443c3d17
github.com/sinmetal/slog v0.0.0-20190711053637-464ece1c004f
github.com/sinmetal/slog v0.0.0-20190711064951-3bf5344ba117
go.mercari.io/datastore v1.4.2
google.golang.org/api v0.6.0
google.golang.org/genproto v0.0.0-20190611190212-a7e196e89fd3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ github.com/sinmetal/slog v0.0.0-20190709124601-586365e285f5 h1:Ju3rtu9u9HpvF37x/
github.com/sinmetal/slog v0.0.0-20190709124601-586365e285f5/go.mod h1:7abRLuXyxKUl/2wBVCkDmFPU8bI4nRVIoZDqOPv5W4o=
github.com/sinmetal/slog v0.0.0-20190711053637-464ece1c004f h1:ct+Y0kkQbcH6Ll6o3p9e7fAVya6/EyHY128ag592yvo=
github.com/sinmetal/slog v0.0.0-20190711053637-464ece1c004f/go.mod h1:7abRLuXyxKUl/2wBVCkDmFPU8bI4nRVIoZDqOPv5W4o=
github.com/sinmetal/slog v0.0.0-20190711064951-3bf5344ba117 h1:PjyTprOtsCOmJfldbFT8CxGy3rMn6YmHzRPG8QZGZmQ=
github.com/sinmetal/slog v0.0.0-20190711064951-3bf5344ba117/go.mod h1:7abRLuXyxKUl/2wBVCkDmFPU8bI4nRVIoZDqOPv5W4o=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
Expand Down
2 changes: 2 additions & 0 deletions logtest_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func HandleLogTestAPI(w http.ResponseWriter, r *http.Request) {
if !ok {
slog.Info(ctx, slog.KV{"MSG", "slog.Value is ng"})
}
lc.Entry.Severity = "INFO"
lc.Entry.HttpRequest.RequestURL = r.RequestURI
j, err := json.Marshal(lc)
if err != nil {
slog.Info(ctx, slog.KV{"MSG", fmt.Sprintf("failed json.Marshal", err)})
Expand Down

0 comments on commit 6212f54

Please sign in to comment.