fix: improved loggin

This commit is contained in:
evilsocket 2018-01-09 14:54:48 +01:00
parent c7c164f153
commit bfbb9dd016
2 changed files with 6 additions and 6 deletions

View file

@ -79,7 +79,7 @@ func (s *EventsStream) Start() error {
tm := e.Time.Format("2006-01-02 15:04:05") tm := e.Time.Format("2006-01-02 15:04:05")
if e.Tag == "sys.log" { if e.Tag == "sys.log" {
fmt.Printf("[%s] [%s] %s %v\n", tm, core.Green(e.Tag), e.Label(), e.Data.(session.LogMessage).Message) fmt.Printf("[%s] [%s] (%s) %s\n", tm, core.Green(e.Tag), e.Label(), e.Data.(session.LogMessage).Message)
} else { } else {
fmt.Printf("[%s] [%s] %v\n", tm, core.Green(e.Tag), e.Data) fmt.Printf("[%s] [%s] %v\n", tm, core.Green(e.Tag), e.Data)
} }

View file

@ -34,11 +34,11 @@ const (
var ( var (
labels = map[int]string{ labels = map[int]string{
DEBUG: "DBG", DEBUG: "dbg",
INFO: "INF", INFO: "inf",
IMPORTANT: "IMP", IMPORTANT: "imp",
WARNING: "WAR", WARNING: "war",
ERROR: "ERR", ERROR: "err",
FATAL: "!!!", FATAL: "!!!",
} }
colors = map[int]string{ colors = map[int]string{