mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 23:39:41 +02:00
fix(http): log HTTP server errors as DEBUG level EE-5225 (#9060)
This commit is contained in:
parent
2d69e93efa
commit
424c98e256
2 changed files with 25 additions and 2 deletions
19
api/http/logger.go
Normal file
19
api/http/logger.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package http
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
zlog "github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
type httpLogger struct{}
|
||||
|
||||
func NewHTTPLogger() *log.Logger {
|
||||
return log.New(&httpLogger{}, "", 0)
|
||||
}
|
||||
|
||||
func (l *httpLogger) Write(data []byte) (int, error) {
|
||||
zlog.Debug().CallerSkipFrame(3).Msg(string(data))
|
||||
|
||||
return len(data), nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue