Skip to content

Commit

Permalink
disable colors on hook example
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsb committed Oct 15, 2018
1 parent 1dcfd11 commit b5f5425
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions example_global_hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ func (h *GlobalHook) Fire(e *logrus.Entry) error {
func Example() {
l := logrus.New()
l.Out = os.Stdout
l.Formatter = &logrus.TextFormatter{DisableTimestamp: true}
l.Formatter.(*logrus.TextFormatter).DisableTimestamp = true
l.Formatter = &logrus.TextFormatter{DisableTimestamp: true, DisableColors: true}
l.AddHook(&GlobalHook{})
mystring = "first value"
l.Info("first log")
Expand Down

0 comments on commit b5f5425

Please sign in to comment.