INNER CODE UNIT · Python
_log_unexpected_exit
ohdearquant/lionagi · lionagi/studio/app.py:137
def _log_unexpected_exit(t: asyncio.Task) -> None:
# Retained handle suppresses asyncio's own warning; surface it loudly instead.
if t.cancelled():
return
exc = t.exception()
if exc is not None:
_log.error(
"Studio transcript mirror exited unexpectedly (%s)",
type(exc).__name__,
)
task.add_done_callback(_log_unexpected_exit)
_log.info(
"Studio transcript mirror tail started (source=%s, since=%s)", source, MIRROR_CLAUDE_SINCE
)
return stop, task