mirror of
https://github.com/containous/traefik.git
synced 2025-01-06 13:17:52 +03:00
17 lines
333 B
Go
17 lines
333 B
Go
package logs
|
|
|
|
import (
|
|
"github.com/aws/aws-sdk-go/aws"
|
|
"github.com/rs/zerolog"
|
|
)
|
|
|
|
func NewAWSWrapper(logger zerolog.Logger) aws.LoggerFunc {
|
|
if logger.GetLevel() > zerolog.DebugLevel {
|
|
return func(args ...interface{}) {}
|
|
}
|
|
|
|
return func(args ...interface{}) {
|
|
logger.Debug().CallerSkipFrame(2).MsgFunc(msgFunc(args...))
|
|
}
|
|
}
|