Commit 901a92955ac1cc968ec359d5b8a3f7ed40f2933a
1 parent
829723543a
Exists in
master
added new line after tracing for more clarity in logs
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
main.go
... | ... | @@ -87,12 +87,6 @@ func (l *Logger) Print(format string, v ...interface{}) { |
87 | 87 | fmt.Printf("%s: %s\n", time.Now().Format(dateTimeFormat), msg) |
88 | 88 | } |
89 | 89 | |
90 | -// PrintTrace ... | |
91 | -func (l *Logger) PrintTrace(format string, v ...interface{}) { | |
92 | - s := getTrace(format, v...) | |
93 | - fmt.Printf("%s", s) | |
94 | -} | |
95 | - | |
96 | 90 | // Trace ... |
97 | 91 | func (l *Logger) Trace(format string, v ...interface{}) string { |
98 | 92 | if l.outputFile == nil { |
... | ... | @@ -102,7 +96,7 @@ func (l *Logger) Trace(format string, v ...interface{}) string { |
102 | 96 | l.mu.Lock() |
103 | 97 | defer l.mu.Unlock() |
104 | 98 | |
105 | - s := getTrace(format, v...) | |
99 | + s := getTrace(format, v...) + "\n" | |
106 | 100 | |
107 | 101 | if l.shouldSplit(len(s)) { |
108 | 102 | l.split() |
... | ... | @@ -112,6 +106,12 @@ func (l *Logger) Trace(format string, v ...interface{}) string { |
112 | 106 | return s |
113 | 107 | } |
114 | 108 | |
109 | +// PrintTrace ... | |
110 | +func (l *Logger) PrintTrace(format string, v ...interface{}) { | |
111 | + s := getTrace(format, v...) | |
112 | + fmt.Printf("%s\n", s) | |
113 | +} | |
114 | + | |
115 | 115 | // PrintAndTrace ... |
116 | 116 | func (l *Logger) PrintAndTrace(format string, v ...interface{}) { |
117 | 117 | t := l.Trace(format, v...) | ... | ... |