Deprecating value "false" for config.log.standard and config.log.events
This commit is contained in:
parent
8b22f71399
commit
5560fc7f98
|
@ -68,7 +68,11 @@ func ConfigLogger(configLogEnabled bool, configLogStandard string, configLogPath
|
|||
// The backend is the part which actually handles logging the log entries somewhere.
|
||||
var backend logging.Backend
|
||||
backend = &NoopBackend{}
|
||||
if configLogEnabled && configLogStandard != "off" && configLogStandard != "false" {
|
||||
if configLogStandard == "false" {
|
||||
configLogStandard = "off"
|
||||
Warning("log.standard value 'false' is deprecated and will be removed in a future release. Please use the value 'off'.")
|
||||
}
|
||||
if configLogEnabled && configLogStandard != "off" {
|
||||
logBackend := logging.NewLogBackend(GetLogWriter(configLogStandard, "standard"), "", 0)
|
||||
backend = logging.NewBackendFormatter(logBackend, logging.MustStringFormatter(Fmt+"\n"))
|
||||
}
|
||||
|
|
|
@ -47,7 +47,11 @@ func NewWatermillLogger(configLogEnabled bool, configLogEvents string, configLog
|
|||
|
||||
var backend logging.Backend
|
||||
backend = &NoopBackend{}
|
||||
if configLogEnabled && configLogEvents != "off" && configLogEvents != "false" {
|
||||
if configLogEvents == "false" {
|
||||
configLogEvents = "off"
|
||||
Warning("log.events value 'false' is deprecated and will be removed in a future release. Please use the value 'off'.")
|
||||
}
|
||||
if configLogEnabled && configLogEvents != "off" {
|
||||
logBackend := logging.NewLogBackend(GetLogWriter(configLogEvents, "events"), "", 0)
|
||||
backend = logging.NewBackendFormatter(logBackend, logging.MustStringFormatter(watermillFmt+"\n"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue