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).
pull/29518/merge
AMIR 5 months ago committed by GitHub
parent fe0c0b04fe
commit 73f7e7c087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      internal/debug/flags.go

@ -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…
Cancel
Save