tlog: disable color codes when switching to syslog
When gocryptfs was started on a terminal and later daemonized, the color codes stayed active in the syslog output. The codes are not visible in "journalctl -f", which is why I have not noticed it yet, but they do show up in normal syslog as the usual "#033[33m" crap.
This commit is contained in:
parent
4cdf6b9af9
commit
1ed08c7384
|
@ -142,6 +142,9 @@ func (l *toggledLogger) SwitchToSyslog(p syslog.Priority) {
|
||||||
Warn.Printf("SwitchToSyslog: %v", err)
|
Warn.Printf("SwitchToSyslog: %v", err)
|
||||||
} else {
|
} else {
|
||||||
l.Logger.SetOutput(w)
|
l.Logger.SetOutput(w)
|
||||||
|
// Disable colors
|
||||||
|
l.prefix = ""
|
||||||
|
l.postfix = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue