1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 11:52:20 +01:00

Add timestamp to ESPHome dashboard/cli logs (#2455)

This commit is contained in:
Alex Iribarren
2021-10-06 21:56:07 +02:00
committed by GitHub
parent 22e3bc7cfe
commit d34a1c3ed6

View File

@@ -50,7 +50,7 @@ def color(col: str, msg: str, reset: bool = True) -> bool:
class ESPHomeLogFormatter(logging.Formatter):
def __init__(self):
super().__init__(fmt="%(levelname)s %(message)s", datefmt="%H:%M:%S", style="%")
super().__init__(fmt="%(asctime)s %(levelname)s %(message)s", style="%")
def format(self, record):
formatted = super().format(record)