Skip to content

Commit f9951cc

Browse files
author
Edward Muller
committed
Associate this example with what it's an example for
1 parent 39a5ad1 commit f9951cc

3 files changed

+7
-5
lines changed

example_custom_caller_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/sirupsen/logrus"
1010
)
1111

12-
func ExampleCustomFormatter() {
12+
func ExampleJSONFormatter_CallerPrettyfier() {
1313
l := logrus.New()
1414
l.SetReportCaller(true)
1515
l.Out = os.Stdout

example_default_field_value_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package logrus_test
22

33
import (
4-
"github.com/sirupsen/logrus"
54
"os"
5+
6+
"github.com/sirupsen/logrus"
67
)
78

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

21-
func ExampleDefaultField() {
22+
func ExampleDefaultFieldHook() {
2223
l := logrus.New()
2324
l.Out = os.Stdout
2425
l.Formatter = &logrus.TextFormatter{DisableTimestamp: true, DisableColors: true}

example_global_hook_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package logrus_test
22

33
import (
4-
"github.com/sirupsen/logrus"
54
"os"
5+
6+
"github.com/sirupsen/logrus"
67
)
78

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

24-
func ExampleGlobalVariableHook() {
25+
func ExampleGlobalHook() {
2526
l := logrus.New()
2627
l.Out = os.Stdout
2728
l.Formatter = &logrus.TextFormatter{DisableTimestamp: true, DisableColors: true}

0 commit comments

Comments
 (0)