From 527b710f8903734c2a6e44d5e3270a346741f163 Mon Sep 17 00:00:00 2001 From: EMRG Evolution Date: Mon, 17 Aug 2026 11:48:02 +0800 Subject: [PATCH] emrg: log lines include date (emrgd.log / emrg-client.log) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host rant 2026-08-17T11:29:49: log timestamps had only HH:MM:SS — the RotatingFileHandler (10MB) spans 2-3 days, so analyzing 'last 24h slowdown' meant guessing the day. Add the date prefix to all 4 loggers: - emrg/server/__main__.py (daemon, emrgd.log) - emrg/client/__main__.py (client) - emrg/__main__.py foreground daemon + TUI client (emrg-client.log) datefmt %H:%M:%S -> %Y-%m-%d %H:%M:%S, asctime format unchanged. No parser depends on the log format (free text), no test changes. --- emrg/__main__.py | 4 ++-- emrg/client/__main__.py | 2 +- emrg/server/__main__.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emrg/__main__.py b/emrg/__main__.py index b14678a3..0f6becc8 100644 --- a/emrg/__main__.py +++ b/emrg/__main__.py @@ -359,7 +359,7 @@ def _run_daemon() -> None: logging.basicConfig( level=logging.DEBUG, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", - datefmt="%H:%M:%S", + datefmt="%Y-%m-%d %H:%M:%S", ) # Suppress noisy httpcore/httpx DEBUG logs (rant #24) logging.getLogger("httpcore").setLevel(logging.WARNING) @@ -434,7 +434,7 @@ def _run_client(init_auto_evolve: bool = False) -> None: logging.basicConfig( level=logging.DEBUG, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", - datefmt="%H:%M:%S", + datefmt="%Y-%m-%d %H:%M:%S", handlers=[ RotatingFileHandler( str(log_path), maxBytes=10 * 1024 * 1024, backupCount=3, diff --git a/emrg/client/__main__.py b/emrg/client/__main__.py index 05f38ab5..e67faf72 100644 --- a/emrg/client/__main__.py +++ b/emrg/client/__main__.py @@ -4,7 +4,7 @@ logging.basicConfig( level=logging.INFO, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", - datefmt="%H:%M:%S", + datefmt="%Y-%m-%d %H:%M:%S", ) from emrg.config import ensure_config from emrg.client.app import run_client diff --git a/emrg/server/__main__.py b/emrg/server/__main__.py index f6229a89..ae40eff1 100644 --- a/emrg/server/__main__.py +++ b/emrg/server/__main__.py @@ -12,7 +12,7 @@ logging.basicConfig( level=logging.DEBUG, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", - datefmt="%H:%M:%S", + datefmt="%Y-%m-%d %H:%M:%S", handlers=[ RotatingFileHandler( str(_log_file), maxBytes=10 * 1024 * 1024, backupCount=3,