Skip to content

Commit

Permalink
fix hook example
Browse files Browse the repository at this point in the history
  • Loading branch information
xrstf committed Nov 9, 2018
1 parent 44067ab commit eab2c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example_hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func Example_hook() {
log.Formatter = new(logrus.TextFormatter) // default
log.Formatter.(*logrus.TextFormatter).DisableColors = true // remove colors
log.Formatter.(*logrus.TextFormatter).DisableTimestamp = true // remove timestamp from test output
if sl, err := slhooks.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, ""); err != nil {
if sl, err := slhooks.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, ""); err == nil {
log.Hooks.Add(sl)
}
log.Out = os.Stdout
Expand Down

0 comments on commit eab2c44

Please sign in to comment.