From d8d206b93f164fe81b7848d0367d3c878faf6f7e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 1 Mar 2024 19:27:10 -0500 Subject: [PATCH] Make stream draining status logs `.debug()` level --- tractor/_root.py | 8 ++++++-- tractor/_streaming.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tractor/_root.py b/tractor/_root.py index c17249d1..88df774f 100644 --- a/tractor/_root.py +++ b/tractor/_root.py @@ -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 diff --git a/tractor/_streaming.py b/tractor/_streaming.py index 64b5dd6d..b2cfe485 100644 --- a/tractor/_streaming.py +++ b/tractor/_streaming.py @@ -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)}' )