Skip to content

Commit

Permalink
fixup! always use a logger no matter what
Browse files Browse the repository at this point in the history
resolves: #824 (comment)
  • Loading branch information
inancgumus committed Mar 10, 2023
1 parent 171cc76 commit 3b2de1b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ func New(logger logrus.FieldLogger, iterID string) *Logger {
if logger == nil {
ll = logrus.New()
ll.Warn("Logger", "no logger supplied, using default")
} else if l, ok := logger.(*logrus.Logger); ok {
ll = l
} else if l, ok := logger.(*logrus.Logger); !ok {
ll.Warn("Logger", "invalid logger type, using default")
} else {
// panic so that we know when to upgrade. see issue #818.
panic("logger is not a logrus.Logger")
ll = l
}

return &Logger{
Expand Down

0 comments on commit 3b2de1b

Please sign in to comment.