diff --git a/go.mod b/go.mod index 39d2b36..4436efe 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index dce3d3f..f61adc6 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/logtest_api.go b/logtest_api.go index e50c7e7..04c8a1b 100644 --- a/logtest_api.go +++ b/logtest_api.go @@ -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)})