diff --git a/example_custom_caller_test.go b/example_custom_caller_test.go index e0023b9..a64ab16 100644 --- a/example_custom_caller_test.go +++ b/example_custom_caller_test.go @@ -9,7 +9,7 @@ import ( "github.com/sirupsen/logrus" ) -func ExampleCustomFormatter() { +func ExampleJSONFormatter_CallerPrettyfier() { l := logrus.New() l.SetReportCaller(true) l.Out = os.Stdout diff --git a/example_default_field_value_test.go b/example_default_field_value_test.go index a72ece4..e7edd1a 100644 --- a/example_default_field_value_test.go +++ b/example_default_field_value_test.go @@ -1,8 +1,9 @@ package logrus_test import ( - "github.com/sirupsen/logrus" "os" + + "github.com/sirupsen/logrus" ) type DefaultFieldHook struct { @@ -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} diff --git a/example_global_hook_test.go b/example_global_hook_test.go index aaf2f4b..ff7b255 100644 --- a/example_global_hook_test.go +++ b/example_global_hook_test.go @@ -1,8 +1,9 @@ package logrus_test import ( - "github.com/sirupsen/logrus" "os" + + "github.com/sirupsen/logrus" ) var ( @@ -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}