diff --git a/console.go b/console.go index 7e65e86f..e573916f 100644 --- a/console.go +++ b/console.go @@ -190,10 +190,16 @@ func (w ConsoleWriter) writeFields(evt map[string]interface{}, buf *bytes.Buffer continue } - switch field { - case LevelFieldName, TimestampFieldName, MessageFieldName, CallerFieldName: + for _, excluded := range w.PartsOrder { + if field == excluded { + isExcluded = true + break + } + } + if isExcluded { continue } + fields = append(fields, field) }