From 7fa5b8af23a00f41a1fed32bb58ead498dcc423d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Tikvi=C4=87?= Date: Wed, 1 Mar 2017 15:25:04 +0100 Subject: [PATCH] Changed order of parameters in LogError(). It seems more intuitive to give simple explanation first. --- gologger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() } -- 1.8.1.2