diff --git a/gologger.go b/gologger.go index 7a4c711..a960dcc 100644 --- a/gologger.go +++ b/gologger.go @@ -136,9 +136,9 @@ func (l *Logger) LogEvent(event string) { l.splitEventLog() } -func (l *Logger) LogError(err error) { +func (l *Logger) LogError(comment string, err error) { muEr.Lock() defer muEr.Unlock() - l.errorf.WriteString(time.Now().Format(time.RFC3339) + ": " + err.Error() + "\n") + l.errorf.WriteString(time.Now().Format(time.RFC3339) + ": " + err.Error() + " ::::: " + comment + "\n") l.splitErrorLog() }