logging: allow logging level override (#7873)

I think in the future we should migrate from having our own logging
interface and use our logger directly, which I think would help
obviate this particular problem, but in the mean time, this seems safe.
This commit is contained in:
Sam Kleinman
2022-02-20 11:18:05 -05:00
committed by GitHub
parent 3401eb2410
commit d65237ff87
3 changed files with 30 additions and 6 deletions

View File

@@ -52,6 +52,10 @@ func RootCommand(conf *config.Config, logger log.Logger) *cobra.Command {
*conf = *pconf
config.EnsureRoot(conf.RootDir)
if err := log.OverrideWithNewLogger(logger, conf.LogFormat, conf.LogLevel); err != nil {
return err
}
return nil
},
}