File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,14 @@ func ConfigureLogging(config *LoggingConfig) (*logrus.Entry, error) {
53
53
logrus .Debug ("Set log level to: " + logrus .GetLevel ().String ())
54
54
}
55
55
56
- log := logrus .StandardLogger ()
57
- if err := AddBugSnagHook (log , config .BugSnag ); err != nil {
56
+ if err := AddBugSnagHook (config .BugSnag ); err != nil {
58
57
return nil , errors .Wrap (err , "Failed to configure bugsnag" )
59
58
}
60
59
61
- return log .WithField ("hostname" , hostname ), nil
60
+ return logrus .WithField ("hostname" , hostname ), nil
62
61
}
63
62
64
- func AddBugSnagHook (log * logrus. Logger , config * BugSnagConfig ) error {
63
+ func AddBugSnagHook (config * BugSnagConfig ) error {
65
64
if config == nil || config .APIKey == "" {
66
65
return nil
67
66
}
@@ -74,7 +73,7 @@ func AddBugSnagHook(log *logrus.Logger, config *BugSnagConfig) error {
74
73
if err != nil {
75
74
return err
76
75
}
77
- log . Hooks . Add (hook )
78
- log .Debug ("Added bugsnag hook" )
76
+ logrus . AddHook (hook )
77
+ logrus .Debug ("Added bugsnag hook" )
79
78
return nil
80
79
}
You can’t perform that action at this time.
0 commit comments