Test logging handlers

This commit is contained in:
Jakob Borg
2014-07-31 14:14:19 +02:00
parent 244f0ffaf1
commit d3ca265a25
2 changed files with 61 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import (
"fmt"
"log"
"os"
"strings"
"sync"
)
@@ -55,7 +56,7 @@ func (l *Logger) SetPrefix(prefix string) {
func (l *Logger) callHandlers(level LogLevel, s string) {
for _, h := range l.handlers[level] {
h(level, s)
h(level, strings.TrimSpace(s))
}
}