Skip to content

Commit

Permalink
fix: CustomLogs hook not applicable for log levels lower than warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Koch committed Jan 16, 2023
1 parent 2170089 commit f0a1cb4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion logging/hooks/custom_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ func init() {
}

func (c *CustomLogs) Levels() []logrus.Level {
return logrus.AllLevels
return []logrus.Level{
logrus.PanicLevel, // reasonable?
logrus.FatalLevel, // reasonable?
logrus.ErrorLevel,
logrus.WarnLevel, // not used?
logrus.InfoLevel,
}
}

func (c *CustomLogs) Fire(entry *logrus.Entry) error {
Expand Down

0 comments on commit f0a1cb4

Please sign in to comment.