mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
[core] Fix setting of log level/verbose (#8600)
This commit is contained in:
parent
1c60038111
commit
5bfb5ccc34
@ -74,13 +74,14 @@ def setup_log(
|
||||
|
||||
colorama.init()
|
||||
|
||||
if log_level == logging.DEBUG:
|
||||
CORE.verbose = True
|
||||
elif log_level == logging.CRITICAL:
|
||||
CORE.quiet = True
|
||||
|
||||
# Setup logging - will map log level from string to constant
|
||||
logging.basicConfig(level=log_level)
|
||||
|
||||
if logging.root.level == logging.DEBUG:
|
||||
CORE.verbose = True
|
||||
elif logging.root.level == logging.CRITICAL:
|
||||
CORE.quiet = True
|
||||
|
||||
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
||||
|
||||
logging.getLogger().handlers[0].setFormatter(
|
||||
|
Loading…
x
Reference in New Issue
Block a user