1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

examples: use the new golog.JSON, comment the manual way for general purpose knowedge that can be used to create a handler for any other custom format

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-06 13:12:54 +03:00
parent ebeb465836
commit 26f515775b
3 changed files with 18 additions and 12 deletions

View File

@@ -30,7 +30,7 @@ func TestJSONLogger(t *testing.T) {
app.Get("/ping", ping)
const expectedLogStr = `{"level":"debug","message":"Request path: /ping","fields":{"request_id":null},"stacktrace":[{"function":"json-logger/ping","source":"C:/mygopath/src/github.com/kataras/iris/_examples/logging/json-logger/main.go:82"}]}`
const expectedLogStr = `{"level":"debug","message":"Request path: /ping","fields":{"request_id":null},"stacktrace":[{"function":"json-logger/ping","source":"C:/mygopath/src/github.com/kataras/iris/_examples/logging/json-logger/main.go:85"}]}`
e := httptest.New(t, app, httptest.LogLevel("debug"))
wg := new(sync.WaitGroup)
wg.Add(iters)