traefik/pkg/logs/aws.go
2022-11-21 18:36:05 +01:00

16 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...))
}
}