Commit 0adcd85023f7ccbbc81ded7aa4446fff86149bc7

Authored by Marko Tikvić
1 parent a62c16cbda
Exists in master

printing and tracing

Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
... ... @@ -116,13 +116,18 @@ func (l *Logger) CombineHTTPLogs(in string, out string) {
116 116 l.outputFile.WriteString(msg)
117 117 }
118 118  
119   -func (l *Logger) Print(format string, v ...interface{}) {
  119 +func (l *Logger) PrintTrace(format string, v ...interface{}) {
120 120 _, file, line, _ := runtime.Caller(1)
121 121  
122 122 msg := fmt.Sprintf(format, v...)
123 123 fmt.Printf("%s: %s %d: %s\n", time.Now().Format(time.RFC3339), file, line, msg)
124 124 }
125 125  
  126 +func (l *Logger) Print(format string, v ...interface{}) {
  127 + msg := fmt.Sprintf(format, v...)
  128 + fmt.Printf("%s: %s\n", time.Now().Format(time.RFC3339), msg)
  129 +}
  130 +
126 131 func (l *Logger) Trace(format string, v ...interface{}) {
127 132 if l.outputFile == nil {
128 133 return
... ...