mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
middleware/logger: new configuration field, defaults to false: Query bool, if true prints the full path, including the URL query as requested at https://github.com/kataras/iris/issues/1017
Former-commit-id: 03c8fc523a8ba955dae43e4c7e9498fc3d86a1c8
This commit is contained in:
@@ -66,7 +66,11 @@ func (l *requestLoggerMiddleware) ServeHTTP(ctx context.Context) {
|
||||
}
|
||||
|
||||
if l.config.Path {
|
||||
path = ctx.Path()
|
||||
if l.config.Query {
|
||||
path = ctx.Request().URL.RequestURI()
|
||||
} else {
|
||||
path = ctx.Path()
|
||||
}
|
||||
}
|
||||
|
||||
var message interface{}
|
||||
|
||||
Reference in New Issue
Block a user