From 61db040702f46902d75187c60d5705e2b46cc8eb Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 26 Apr 2024 13:13:04 -0400 Subject: [PATCH] More bitty (runtime) logging tweaks --- tractor/_portal.py | 6 +++--- tractor/_streaming.py | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tractor/_portal.py b/tractor/_portal.py index f392865..e25a6c7 100644 --- a/tractor/_portal.py +++ b/tractor/_portal.py @@ -254,11 +254,11 @@ class Portal: return False reminfo: str = ( - f'`Portal.cancel_actor()` => {self.channel.uid}\n' - f' |_{chan}\n' + f'Portal.cancel_actor() => {self.channel.uid}\n' + f'|_{chan}\n' ) log.cancel( - f'Sending runtime `.cancel()` request to peer\n\n' + f'Requesting runtime cancel for peer\n\n' f'{reminfo}' ) diff --git a/tractor/_streaming.py b/tractor/_streaming.py index 764b7c1..dd4cd0e 100644 --- a/tractor/_streaming.py +++ b/tractor/_streaming.py @@ -364,14 +364,10 @@ class MsgStream(trio.abc.Channel): if not self._eoc: message: str = ( - f'Context stream closed by {self._ctx.side!r}\n' + f'Stream self-closed by {self._ctx.side!r}-side before EoC\n' f'|_{self}\n' ) - log.cancel( - 'Stream self-closed before receiving EoC\n\n' - + - message - ) + log.cancel(message) self._eoc = trio.EndOfChannel(message) # ?XXX WAIT, why do we not close the local mem chan `._rx_chan` XXX?