diff --git a/logging/logrusadapter/adapter.go b/logging/logrusadapter/adapter.go index dfe00ab..d0350ab 100644 --- a/logging/logrusadapter/adapter.go +++ b/logging/logrusadapter/adapter.go @@ -57,7 +57,17 @@ func (a *adapter) SetStackTrace(trace errors.StackTrace) { a.log = a.log.WithField("stackTrace", frames) } +type levelLogger interface { + Log(level logrus.Level, args ...interface{}) +} + func (a *adapter) Log(message string) { + if levelLog, ok := a.log.(levelLogger); ok { + levelLog.Log(a.level, message) + + return + } + switch a.level { case logrus.PanicLevel: a.log.Panic(message)