diff --git a/gologger.go b/gologger.go index f835d36..d53e653 100644 --- a/gologger.go +++ b/gologger.go @@ -134,7 +134,6 @@ func (l *Logger) LogEvent(event string) { } func (l *Logger) LogError(err error) { - estring := strings.TrimSuffix(fmt.Sprintf("%v", err), "\n") - l.errorf.WriteString(time.Now().Format(time.UnixDate) + ": " + estring + "\n") + l.errorf.WriteString(time.Now().Format(time.UnixDate) + ": " + err.Error() + "\n") l.splitErrorLog() }