fix fileVal check

This commit is contained in:
Turing Zhu 2019-06-20 13:49:56 +08:00
parent 2a22dbedba
commit 18fad4b3c0
2 changed files with 2 additions and 2 deletions

View File

@ -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
}
}

View File

@ -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))
}
}