mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
add more information for access log
Former-commit-id: 60517837c5bfdb2d879909c4b413e83cbd10321a
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user