Repository navigation
Capture asyncio/alembic/warnings logs and install crash hooks #1466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
41cf074
39ecb7b
6b4dab2
5dca16f
c6f4bac
5998f6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,11 @@ def ensure_writable_db_path(path): | |
|
|
||
|
|
||
| from digi_server.app_server import DigiScriptServer | ||
| from digi_server.logger import add_logging_level, get_logger | ||
| from digi_server.logger import ( | ||
| add_logging_level, | ||
| get_logger, | ||
| install_exception_hooks, | ||
| ) | ||
|
|
||
|
|
||
| add_logging_level("TRACE", logging.DEBUG - 5) | ||
|
|
@@ -51,6 +55,12 @@ def ensure_writable_db_path(path): | |
|
|
||
|
|
||
| async def main(): | ||
| # Installed first so crashes during startup are counted and reach stderr | ||
| # (logging's last-resort handler). The durable file log and in-app buffer | ||
| # handlers are attached later by DigiScriptServer.configure(), so errors in | ||
| # this early window are not written to the log file. | ||
| install_exception_hooks(asyncio.get_running_loop()) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: 🤖 Generated with Claude Code
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed — this was a Suggestion, not a blocker, and documenting the tradeoff in the comment at 🤖 Generated with Claude Code |
||
|
|
||
| # Parse command-line options | ||
| try: | ||
| parse_command_line() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.