traefik/pkg/logs/aws.go

17 lines
333 B
Go
Raw Normal View History

2022-11-21 17:36:05 +00:00
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...))
}
}