log: add support for trace level, exit on critical

This commit is contained in:
Péter Szilágyi
2017-02-20 18:05:15 +02:00
parent ec7f81f4bc
commit b9d48b4a93
5 changed files with 23 additions and 0 deletions

View File

@ -38,6 +38,8 @@ func sharedSyslog(fmtr Format, sysWr *syslog.Writer, err error) (Handler, error)
syslogFn = sysWr.Info
case LvlDebug:
syslogFn = sysWr.Debug
case LvlTrace:
syslogFn = func(m string) error { return nil } // There's no syslog level for trace
}
s := strings.TrimSpace(string(fmtr.Format(r)))