Init colorama in ESPHome main (#5111)

This commit is contained in:
Kuba Szczodrzyński 2023-07-22 10:25:01 +02:00 committed by GitHub
parent efd0dd4c3d
commit 80154b280e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,6 +71,8 @@ def setup_log(
) -> None:
import colorama
colorama.init()
if debug:
log_level = logging.DEBUG
CORE.verbose = True
@ -82,7 +84,6 @@ def setup_log(
logging.getLogger("urllib3").setLevel(logging.WARNING)
colorama.init()
logging.getLogger().handlers[0].setFormatter(
ESPHomeLogFormatter(include_timestamp=include_timestamp)
)