mirror of
https://github.com/kataras/iris.git
synced 2025-12-21 11:57:02 +00:00
add TraceRoute feature on request logger
This commit is contained in:
@@ -139,6 +139,10 @@ func (l *requestLoggerMiddleware) ServeHTTP(ctx *context.Context) {
|
||||
} else {
|
||||
ctx.Application().Logger().Info(line)
|
||||
}
|
||||
|
||||
if l.config.TraceRoute && ctx.GetCurrentRoute() != nil /* it is nil on unhandled error codes */ {
|
||||
ctx.GetCurrentRoute().Trace(ctx.Application().Logger().Printer)
|
||||
}
|
||||
}
|
||||
|
||||
// Columnize formats the given arguments as columns and returns the formatted output,
|
||||
|
||||
Reference in New Issue
Block a user