forked from External/ergo
logging: Add userinput and output, fix up lots
This commit is contained in:
parent
415a8117ee
commit
b328a4fcd3
6 changed files with 25 additions and 6 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue