Skip to content

fix: use logger.exception for engine init failure to capture traceback#25

Open
kenyonxu wants to merge 1 commit into
qualixar:mainfrom
kenyonxu:fix/engine-init-exception-logging
Open

fix: use logger.exception for engine init failure to capture traceback#25
kenyonxu wants to merge 1 commit into
qualixar:mainfrom
kenyonxu:fix/engine-init-exception-logging

Conversation

@kenyonxu
Copy link
Copy Markdown

Summary

When engine initialization fails in the unified daemon's lifespan(), the current code uses logger.warning("Engine init failed: %s", exc) which only prints the exception message — not the full traceback. This makes root-cause diagnosis very difficult, especially for issues where the error message alone is insufficient to trace the failure path.

Fix

Replace logger.warning("Engine init failed: %s", exc) with logger.exception("Engine init failed"). The logger.exception() method automatically includes the full traceback via sys.exc_info(), providing complete diagnostic information in the log when engine init fails.

logger.exception() automatically includes the full traceback via
sys.exc_info(), enabling root-cause diagnosis when engine init fails.
Previously logger.warning only printed the exception message, making
debugging Hermes Agent permanent-busy issues much harder.
varun369 added a commit that referenced this pull request May 18, 2026
…k (PR #25)

When engine initialization fails in the unified daemon's lifespan(),
the previous code used logger.warning(..., exc) which only prints the
exception message — not the full traceback. This makes root-cause
diagnosis very difficult.

Replace with logger.exception() which automatically includes the full
traceback via sys.exc_info().

Author: kenyonxu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant