1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

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

View File

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