Skip to content

Commit

Permalink
log warnings to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanhorstmann committed Dec 29, 2020
1 parent a1a505b commit f09b981
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdemuxerhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func (hook *StdDemuxerHook) Fire(entry *logrus.Entry) error {

switch entry.Level {
// stderr
case logrus.WarnLevel:
hook.stdErrLogger.WithFields(entry.Data).Warn(entry.Message)
case logrus.ErrorLevel:
hook.stdErrLogger.WithFields(entry.Data).Error(entry.Message)
case logrus.PanicLevel:
Expand All @@ -64,8 +66,6 @@ func (hook *StdDemuxerHook) Fire(entry *logrus.Entry) error {
hook.stdOutLogger.WithFields(entry.Data).Debug(entry.Message)
case logrus.InfoLevel:
hook.stdOutLogger.WithFields(entry.Data).Info(entry.Message)
case logrus.WarnLevel:
hook.stdOutLogger.WithFields(entry.Data).Warn(entry.Message)
}

return nil
Expand Down

0 comments on commit f09b981

Please sign in to comment.