Skip to content

Commit

Permalink
Associate this example with what it's an example for
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Muller committed Oct 14, 2019
1 parent 39a5ad1 commit f9951cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example_custom_caller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/sirupsen/logrus"
)

func ExampleCustomFormatter() {
func ExampleJSONFormatter_CallerPrettyfier() {
l := logrus.New()
l.SetReportCaller(true)
l.Out = os.Stdout
Expand Down
5 changes: 3 additions & 2 deletions example_default_field_value_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package logrus_test

import (
"github.com/sirupsen/logrus"
"os"

"github.com/sirupsen/logrus"
)

type DefaultFieldHook struct {
Expand All @@ -18,7 +19,7 @@ func (h *DefaultFieldHook) Fire(e *logrus.Entry) error {
return nil
}

func ExampleDefaultField() {
func ExampleDefaultFieldHook() {
l := logrus.New()
l.Out = os.Stdout
l.Formatter = &logrus.TextFormatter{DisableTimestamp: true, DisableColors: true}
Expand Down
5 changes: 3 additions & 2 deletions example_global_hook_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package logrus_test

import (
"github.com/sirupsen/logrus"
"os"

"github.com/sirupsen/logrus"
)

var (
Expand All @@ -21,7 +22,7 @@ func (h *GlobalHook) Fire(e *logrus.Entry) error {
return nil
}

func ExampleGlobalVariableHook() {
func ExampleGlobalHook() {
l := logrus.New()
l.Out = os.Stdout
l.Formatter = &logrus.TextFormatter{DisableTimestamp: true, DisableColors: true}
Expand Down

0 comments on commit f9951cc

Please sign in to comment.