mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-10 08:32:09 +00:00
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.
This commit is contained in:
parent
a7d4ada79c
commit
af245abec9
1 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue