1
0
Fork 0
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:
andres-portainer 2023-06-12 09:54:28 -03:00 committed by GitHub
parent 2d69e93efa
commit 424c98e256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 2 deletions

19
api/http/logger.go Normal file
View 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
}