diff --git a/json_formatter.go b/json_formatter.go index 098a21a..b951c89 100644 --- a/json_formatter.go +++ b/json_formatter.go @@ -97,7 +97,7 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { if funcVal != "" { data[f.FieldMap.resolve(FieldKeyFunc)] = funcVal } - if fileVal != "" { + if fileVal != ":0" { data[f.FieldMap.resolve(FieldKeyFile)] = fileVal } } diff --git a/text_formatter.go b/text_formatter.go index e01587c..5460200 100644 --- a/text_formatter.go +++ b/text_formatter.go @@ -139,7 +139,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { if funcVal != "" { fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFunc)) } - if fileVal != "" { + if fileVal != ":0" { fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFile)) } }