diff --git a/piker/brokers/_util.py b/piker/brokers/_util.py index d1b2aac5..ba123156 100644 --- a/piker/brokers/_util.py +++ b/piker/brokers/_util.py @@ -15,13 +15,28 @@ # along with this program. If not, see . """ -Handy utils. +Handy cross-broker utils. + """ +from functools import partial + import json import asks import logging -from ..log import colorize_json +from ..log import ( + get_logger, + get_console_log, + colorize_json, +) +subsys: str = 'piker.brokers' + +log = get_logger(subsys) + +get_console_log = partial( + get_console_log, + name=subsys, +) class BrokerError(Exception): @@ -69,7 +84,6 @@ class DataThrottle(BrokerError): # TODO: add in throttle metrics/feedback - def resproc( resp: asks.response_objects.Response, log: logging.Logger,