From 901a92955ac1cc968ec359d5b8a3f7ed40f2933a Mon Sep 17 00:00:00 2001 From: "marko.tikvic" Date: Thu, 22 Aug 2019 14:47:17 +0200 Subject: [PATCH] added new line after tracing for more clarity in logs --- main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index a27bbff..7360305 100644 --- a/main.go +++ b/main.go @@ -87,12 +87,6 @@ func (l *Logger) Print(format string, v ...interface{}) { fmt.Printf("%s: %s\n", time.Now().Format(dateTimeFormat), msg) } -// PrintTrace ... -func (l *Logger) PrintTrace(format string, v ...interface{}) { - s := getTrace(format, v...) - fmt.Printf("%s", s) -} - // Trace ... func (l *Logger) Trace(format string, v ...interface{}) string { if l.outputFile == nil { @@ -102,7 +96,7 @@ func (l *Logger) Trace(format string, v ...interface{}) string { l.mu.Lock() defer l.mu.Unlock() - s := getTrace(format, v...) + s := getTrace(format, v...) + "\n" if l.shouldSplit(len(s)) { l.split() @@ -112,6 +106,12 @@ func (l *Logger) Trace(format string, v ...interface{}) string { return s } +// PrintTrace ... +func (l *Logger) PrintTrace(format string, v ...interface{}) { + s := getTrace(format, v...) + fmt.Printf("%s\n", s) +} + // PrintAndTrace ... func (l *Logger) PrintAndTrace(format string, v ...interface{}) { t := l.Trace(format, v...) -- 1.8.1.2