Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tractor/ipc/_chan.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,12 @@ async def send(
'''
__tracebackhide__: bool = hide_tb
try:
log.transport(
'=> send IPC msg:\n\n'
f'{pformat(payload)}\n'
)
if log.at_least_level('transport'):
# don't materialize the payload repr if not necessary
log.transport(
'=> send IPC msg:\n\n'
f'{pformat(payload)}\n'
)
# assert self._transport # but why typing?
await self._transport.send(
payload,
Expand Down
18 changes: 9 additions & 9 deletions tractor/msg/_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ def decode_pld(
):
try:
pld: PayloadT = self._pld_dec.decode(pld)
log.runtime(
f'Decoded payload for\n'
# f'\n'
f'{msg}\n'
# ^TODO?, ideally just render with `,
# pld={decode}` in the `msg.pformat()`??
f'where, '
f'{type(msg).__name__}.pld={pld!r}\n'
)
if log.at_least_level('runtime'):
# don't materialize the payload repr if not necessary
log.runtime(
f'Decoded payload for\n'
f'\n'
f'{msg}\n'
f'where, '
f'{type(msg).__name__}.pld={pld!r}\n'
)
return pld
except TypeError as typerr:
__tracebackhide__: bool = False
Expand Down
Loading