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:
AMIR 2024-06-25 13:00:58 +03:30 committed by GitHub
parent fe0c0b04fe
commit 73f7e7c087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -231,9 +231,9 @@ func Setup(ctx *cli.Context) error {
case ctx.Bool(logjsonFlag.Name):
// 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")
handler = log.JSONHandlerWithLevel(output, log.LevelInfo)
handler = log.JSONHandler(output)
case logFmtFlag == "json":
handler = log.JSONHandlerWithLevel(output, log.LevelInfo)
handler = log.JSONHandler(output)
case logFmtFlag == "logfmt":
handler = log.LogfmtHandler(output)
case logFmtFlag == "", logFmtFlag == "terminal":