daemon/logging: format human: treat 'subsystem' field prefixed

logging.Subsystem != string
=> typecast failed

(Also, nobody guarantees that e.Fields contains `field`)
This commit is contained in:
Ross Williams 2019-07-27 16:04:01 +00:00 committed by Christian Schwarz
parent 2cd9173bfb
commit 00434f4ac9

View File

@ -88,7 +88,7 @@ func (f *HumanFormatter) Format(e *logger.Entry) (out []byte, err error) {
prefixFields := []string{JobField, SubsysField}
prefixed := make(map[string]bool, len(prefixFields)+2)
for _, field := range prefixFields {
val, ok := e.Fields[field].(string)
val, ok := e.Fields[field]
if !ok {
continue
}