internal/debug: remove unnecessary log level assignment (#30044)
Log level is specified in L259 so it's unnecessary to specify it for handlers (L234, L236).
This commit is contained in:
parent
fe0c0b04fe
commit
73f7e7c087
@ -231,9 +231,9 @@ func Setup(ctx *cli.Context) error {
|
|||||||
case ctx.Bool(logjsonFlag.Name):
|
case ctx.Bool(logjsonFlag.Name):
|
||||||
// Retain backwards compatibility with `--log.json` flag if `--log.format` not set
|
// Retain backwards compatibility with `--log.json` flag if `--log.format` not set
|
||||||
defer log.Warn("The flag '--log.json' is deprecated, please use '--log.format=json' instead")
|
defer log.Warn("The flag '--log.json' is deprecated, please use '--log.format=json' instead")
|
||||||
handler = log.JSONHandlerWithLevel(output, log.LevelInfo)
|
handler = log.JSONHandler(output)
|
||||||
case logFmtFlag == "json":
|
case logFmtFlag == "json":
|
||||||
handler = log.JSONHandlerWithLevel(output, log.LevelInfo)
|
handler = log.JSONHandler(output)
|
||||||
case logFmtFlag == "logfmt":
|
case logFmtFlag == "logfmt":
|
||||||
handler = log.LogfmtHandler(output)
|
handler = log.LogfmtHandler(output)
|
||||||
case logFmtFlag == "", logFmtFlag == "terminal":
|
case logFmtFlag == "", logFmtFlag == "terminal":
|
||||||
|
Loading…
Reference in New Issue
Block a user