mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 01:13:10 -06:00
Fix conditional in format function
This commit is contained in:
parent
d31f6fbcc2
commit
b10cf01ae4
|
|
@ -32,7 +32,6 @@ type dendriteFormatter struct {
|
|||
func (f dendriteFormatter) Format(entry *logrus.Entry) (format []byte, err error) {
|
||||
entry.Time = entry.Time.UTC()
|
||||
|
||||
if _, ok := entry.Data["prefix"]; ok {
|
||||
prefix, ok := entry.Data["prefix"].(string)
|
||||
if !ok {
|
||||
return f.TextFormatter.Format(entry)
|
||||
|
|
@ -60,9 +59,6 @@ func (f dendriteFormatter) Format(entry *logrus.Entry) (format []byte, err error
|
|||
}
|
||||
entryCpy.Data = fields
|
||||
format, err = f.TextFormatter.Format(&entryCpy)
|
||||
} else {
|
||||
format, err = f.TextFormatter.Format(entry)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue