mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-22 16:46:29 +00:00
Add full year and milliseconds to log timestamp (#4954)
This synchronizes log timestamps with how Home Assistant Core formats them: Using the full 4 digit year and milliseconds precision. See also https://github.com/home-assistant/core/pull/74518.
This commit is contained in:
parent
a8af04ff82
commit
b15a5c2c87
@ -256,9 +256,11 @@ def migrate_system_env(coresys: CoreSys) -> None:
|
||||
def initialize_logging() -> None:
|
||||
"""Initialize the logging."""
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
fmt = "%(asctime)s %(levelname)s (%(threadName)s) [%(name)s] %(message)s"
|
||||
fmt = (
|
||||
"%(asctime)s.%(msecs)03d %(levelname)s (%(threadName)s) [%(name)s] %(message)s"
|
||||
)
|
||||
colorfmt = f"%(log_color)s{fmt}%(reset)s"
|
||||
datefmt = "%y-%m-%d %H:%M:%S"
|
||||
datefmt = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
# suppress overly verbose logs from libraries that aren't helpful
|
||||
logging.getLogger("aiohttp.access").setLevel(logging.WARNING)
|
||||
|
Loading…
x
Reference in New Issue
Block a user