mirror of https://github.com/sirupsen/logrus.git
fix fileVal check
This commit is contained in:
parent
2a22dbedba
commit
18fad4b3c0
|
@ -97,7 +97,7 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
|
||||||
if funcVal != "" {
|
if funcVal != "" {
|
||||||
data[f.FieldMap.resolve(FieldKeyFunc)] = funcVal
|
data[f.FieldMap.resolve(FieldKeyFunc)] = funcVal
|
||||||
}
|
}
|
||||||
if fileVal != "" {
|
if fileVal != ":0" {
|
||||||
data[f.FieldMap.resolve(FieldKeyFile)] = fileVal
|
data[f.FieldMap.resolve(FieldKeyFile)] = fileVal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
||||||
if funcVal != "" {
|
if funcVal != "" {
|
||||||
fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFunc))
|
fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFunc))
|
||||||
}
|
}
|
||||||
if fileVal != "" {
|
if fileVal != ":0" {
|
||||||
fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFile))
|
fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFile))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue