From c366c404083ddc809d95b7ecdeed5bf0728fff1e Mon Sep 17 00:00:00 2001 From: n-dusan Date: Fri, 10 Apr 2026 15:30:25 +0200 Subject: [PATCH] feat(logging): consolidate log format to match OLL standard Update DEFAULT_LOG_FORMAT to %(asctime)s [%(levelname)s] [%(name)s:%(lineno)s] %(message)s and remove DEFAULT_DATE_FORMAT so timestamps use Python's default YYYY-MM-DD HH:MM:SS,mmm, consistent with portal and publish-server. [changelog] --- upgrade/scripts/logging_config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/upgrade/scripts/logging_config.py b/upgrade/scripts/logging_config.py index 764cc79..d2e0066 100644 --- a/upgrade/scripts/logging_config.py +++ b/upgrade/scripts/logging_config.py @@ -15,8 +15,7 @@ from pathlib import Path from typing import Optional, Tuple -DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)s %(name)s %(message)s" -DEFAULT_DATE_FORMAT = "%Y-%m-%dT%H:%M:%S%z" +DEFAULT_LOG_FORMAT = "%(asctime)s [%(levelname)s] [%(name)s:%(lineno)s] %(message)s" UPGRADE_HANDLER_ATTR = "_upgrade_handler" @@ -77,7 +76,7 @@ def configure_logging( not _is_upgrade_handler(handler) for handler in root.handlers ) - formatter = logging.Formatter(DEFAULT_LOG_FORMAT, datefmt=DEFAULT_DATE_FORMAT) + formatter = logging.Formatter(DEFAULT_LOG_FORMAT) if test: stream_handler = logging.StreamHandler(sys.stderr)