Make stream draining status logs `.debug()` level

ctx_cancel_semantics_and_overruns
Tyler Goodlet 2024-03-01 19:27:10 -05:00
parent fb55784798
commit d8d206b93f
2 changed files with 7 additions and 3 deletions

View File

@ -25,6 +25,7 @@ import logging
import signal
import sys
import os
import typing
import warnings
@ -236,8 +237,11 @@ async def open_root_actor(
entered = await _debug._maybe_enter_pm(err)
if not entered and not is_multi_cancelled(err):
logger.exception("Root actor crashed:")
if (
not entered
and not is_multi_cancelled(err)
):
logger.exception('Root actor crashed:\n')
# always re-raise
raise

View File

@ -265,7 +265,7 @@ class MsgStream(trio.abc.Channel):
try:
maybe_final_msg = self.receive_nowait()
if maybe_final_msg:
log.cancel(
log.debug(
'Drained un-processed stream msg:\n'
f'{pformat(maybe_final_msg)}'
)