From af245abec9edc6100ab1adbed32598f3eadff7eb Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Fri, 15 May 2026 16:38:23 -0500 Subject: [PATCH] Default dashboard startup logging to GUI mode. Detect the dashboard subcommand during early CLI bootstrap so gui.log is attached from process start and GUI startup failures are always captured. --- hermes_cli/main.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hermes_cli/main.py b/hermes_cli/main.py index 0cda09db57b..67e885d13eb 100644 --- a/hermes_cli/main.py +++ b/hermes_cli/main.py @@ -235,10 +235,20 @@ except Exception: # Initialize centralized file logging early — all `hermes` subcommands # (chat, setup, gateway, config, etc.) write to agent.log + errors.log. +# Dashboard entrypoints bootstrap with GUI mode so gui.log is always present +# during GUI testing, including pre-dispatch startup failures. try: from hermes_logging import setup_logging as _setup_logging - _setup_logging(mode="cli") + _early_mode = "cli" + for _arg in sys.argv[1:]: + if _arg.startswith("-"): + continue + if _arg == "dashboard": + _early_mode = "gui" + break + + _setup_logging(mode=_early_mode) except Exception: pass # best-effort — don't crash the CLI if logging setup fails