From ba32f286b9651d6f65a4a17d9e9992a8a5b267c0 Mon Sep 17 00:00:00 2001 From: goodboy Date: Wed, 10 Jun 2026 20:13:08 -0400 Subject: [PATCH] datad: console-log the backend's mod subtree Pre the (datad|brokerd)-split this was done by `brokerd`'s daemon fixture, so ALSO `get_console_log()` the provider backend's mod subtree (eg. `piker.brokers.ib.*`) in `_setup_persistent_datad()`; without it all backend records emitted in the `datad` actor fall through to the stdlib's bare (non-colorized) `logging.lastResort` handler. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code Co-Authored-By: Claude Fable 5 --- piker/data/_daemon.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/piker/data/_daemon.py b/piker/data/_daemon.py index 663d7102..116d1346 100644 --- a/piker/data/_daemon.py +++ b/piker/data/_daemon.py @@ -93,6 +93,18 @@ async def _setup_persistent_datad( ) assert log.name == _util.subsys + # XXX: ALSO enable console logging for the provider + # backend's mod subtree (eg. `piker.brokers.ib.*`) + # since (pre the datad|brokerd-split) that was done + # by `brokerd`'s fixture; without this all backend + # records here fall through to the stdlib's bare + # (non-colorized) `logging.lastResort` handler! + get_console_log( + level=loglevel or tll, + name=f'piker.brokers.{brokername}', + with_tractor_log=bool(tll), + ) + from piker.data import feed assert not feed._bus