1
0
Fork 0
forked from External/ergo

logging: Add userinput and output, fix up lots

This commit is contained in:
Daniel Oaks 2017-03-06 22:11:10 +10:00
parent 415a8117ee
commit b328a4fcd3
6 changed files with 25 additions and 6 deletions

View file

@ -9,6 +9,8 @@ import (
"os"
"time"
"strings"
"github.com/mgutz/ansi"
)
@ -115,7 +117,8 @@ func (logger *SingleLogger) Log(level LogLevel, logType string, messageParts ...
}
// ensure we're capturing this logType
capturing := (logger.Types["*"] || logger.Types[logType]) && !logger.ExcludedTypes["*"] && !logger.ExcludedTypes[logType]
logTypeCleaned := strings.ToLower(strings.TrimSpace(logType))
capturing := (logger.Types["*"] || logger.Types[logTypeCleaned]) && !logger.ExcludedTypes["*"] && !logger.ExcludedTypes[logTypeCleaned]
if !capturing {
return
}