future-umbrella-45124
09/25/2025, 9:38 AMtall-airline-16756
09/25/2025, 9:38 AMtall-airline-16756
09/25/2025, 9:39 AMimport sys
# Restore default traceback printing
sys.excepthook = sys.__excepthook__
It’s best to place this in your entrypoint function or right at the module-level initialization. This way, any uncaught exceptions will show the full stack traces in your logs, making debugging much smoother.
Also, if you want even more detailed logs, you can increase the log level to DEBUG by starting your agent like this:
python agent.py start --log-level=DEBUG
This will capture those stack traces and give you richer log details. If you run into any hiccups or have questions along the way, feel free to reach out—I’m here to help!
Sources: Worker options | LiveKit Docs | Log collection | LiveKit Docs | livekit-agents/livekit/agents/ipc/inference_proc_lazy_main.py