klippy: properly set log level when logging to stderr

The `logging.basicConfig` does not reconfigure default logger.
This results in printing only warnings/errors to stderr
instead of also info (or debug).

This fixes the issue by setting log level on root logger.

Signed-off-by: Kamil Trzciński <ayufan@ayufan.eu>
This commit is contained in:
Kamil Trzciński 2022-06-24 13:17:20 +02:00 committed by KevinOConnor
parent 6ad6e39ad2
commit 045455648a
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ def main():
start_args['log_file'] = options.logfile
bglogger = queuelogger.setup_bg_logging(options.logfile, debuglevel)
else:
logging.basicConfig(level=debuglevel)
logging.getLogger().setLevel(debuglevel)
logging.info("Starting Klippy...")
start_args['software_version'] = util.get_git_version()
start_args['cpu_info'] = util.get_cpu_info()