Commit 7fa5b8af23a00f41a1fed32bb58ead498dcc423d
1 parent
ce403bd83b
Exists in
master
Changed order of parameters in LogError(). It seems more intuitive to give simple explanation first.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
gologger.go
... | ... | @@ -136,9 +136,9 @@ func (l *Logger) LogEvent(event string) { |
136 | 136 | l.splitEventLog() |
137 | 137 | } |
138 | 138 | |
139 | -func (l *Logger) LogError(err error) { | |
139 | +func (l *Logger) LogError(comment string, err error) { | |
140 | 140 | muEr.Lock() |
141 | 141 | defer muEr.Unlock() |
142 | - l.errorf.WriteString(time.Now().Format(time.RFC3339) + ": " + err.Error() + "\n") | |
142 | + l.errorf.WriteString(time.Now().Format(time.RFC3339) + ": " + err.Error() + " ::::: " + comment + "\n") | |
143 | 143 | l.splitErrorLog() |
144 | 144 | } | ... | ... |