Add json LogSystem #538

This commit is contained in:
Taylor Gerring
2015-03-21 07:26:44 +01:00
parent 4f5b362bda
commit 9edb9a21bc
3 changed files with 27 additions and 2 deletions

View File

@ -76,8 +76,7 @@ func dispatchLoop() {
func sysLoop(sys LogSystem, in <-chan message, wg *sync.WaitGroup) {
for msg := range in {
switch sys.(type) {
case *rawLogSystem:
// This is a semantic hack since rawLogSystem has little to do with JsonLevel
case *jsonLogSystem:
if msg.level == JsonLevel {
sys.LogPrint(msg.level, msg.msg)
}