1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-30 00:07:04 +00:00

add more information for access log merge pull request #946 from Chengyumeng/feature/logger

Former-commit-id: 91fbc9420c52287231a284aa8092764c7273e987
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-03-27 10:06:29 +03:00
committed by GitHub
3 changed files with 58 additions and 18 deletions

View File

@@ -22,7 +22,10 @@ func main() {
// if !empty then its contents derives from `ctx.Values().Get("logger_message")
// will be added to the logs.
MessageContextKey: "logger_message",
MessageContextKeys: []string{"logger_message"},
// if !empty then its contents derives from `ctx.GetHeader("User-Agent")
MessageHeaderKeys: []string{"User-Agent"},
})
app.Use(customLogger)