Add an example hook which adds default fields

This commit is contained in:
David Bariod
2019-01-17 09:37:03 +01:00
parent 78fb3852d9
commit a99ca4776d
2 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ func (h *GlobalHook) Fire(e *logrus.Entry) error {
return nil
}
func Example() {
func ExampleGlobalVariableHook() {
l := logrus.New()
l.Out = os.Stdout
l.Formatter = &logrus.TextFormatter{DisableTimestamp: true, DisableColors: true}