mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Fix incorrect router logger (#26137)
A low-level mistake: * `log.Info` is global `Info` function, which calls "default" logger * `logger.Info` is the for router's logger
This commit is contained in:
parent
e62ea96ada
commit
3e4a4f9c67
@ -89,13 +89,13 @@ func logPrinter(logger log.Logger) func(trigger Event, record *requestRecord) {
|
||||
if v, ok := record.responseWriter.(types.ResponseStatusProvider); ok {
|
||||
status = v.WrittenStatus()
|
||||
}
|
||||
logf := log.Info
|
||||
logf := logger.Info
|
||||
if strings.HasPrefix(req.RequestURI, "/assets/") {
|
||||
logf = log.Trace
|
||||
logf = logger.Trace
|
||||
}
|
||||
message := completedMessage
|
||||
if isUnknownHandler {
|
||||
logf = log.Error
|
||||
logf = logger.Error
|
||||
message = unknownHandlerMessage
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user