forked from mirror/logrus
Fixed initTerminal() was run for non-terminals
This commit is contained in:
parent
cf5eba7dfd
commit
9bc59a5969
|
@ -51,7 +51,6 @@ type TextFormatter struct {
|
|||
// be desired.
|
||||
DisableSorting bool
|
||||
|
||||
|
||||
// Disables the truncation of the level text to 4 characters.
|
||||
DisableLevelTruncation bool
|
||||
|
||||
|
@ -68,8 +67,10 @@ func (f *TextFormatter) init(entry *Entry) {
|
|||
if entry.Logger != nil {
|
||||
f.isTerminal = checkIfTerminal(entry.Logger.Out)
|
||||
|
||||
if f.isTerminal {
|
||||
f.initTerminal(entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Format renders a single log entry
|
||||
|
|
Loading…
Reference in New Issue