fixing multilogger so that v is properly nil instead of an empty slice if not specified

This commit is contained in:
2022-01-05 16:16:24 -05:00
parent 0e01306637
commit 4addc44c0f
5 changed files with 85 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ import (
func (l *StdLogger) Setup() {
l.Logger = log.Default()
l.Logger.SetPrefix(l.Prefix)
l.Logger.SetPrefix(l.Prefix + " ")
}
// Shutdown cleanly shuts down a StdLogger.
@@ -38,8 +38,8 @@ func (l *StdLogger) DoDebug(d bool) {
// SetPrefix sets the prefix for this StdLogger.
func (l *StdLogger) SetPrefix(prefix string) {
l.Prefix = prefix
l.Logger.SetPrefix(prefix)
l.Prefix = prefix + " "
l.Logger.SetPrefix(prefix + " ")
}
// Alert writes an ALERT-level message to this StdLogger.