Create sub-pkg logger once during import

kraken_ledger_pps
Tyler Goodlet 2022-07-05 16:59:47 -04:00
parent 609034c634
commit af01e89612
4 changed files with 9 additions and 5 deletions

View File

@ -25,6 +25,11 @@ Sub-modules within break into the core functionalities:
wrapping around ``ib_insync``.
'''
from piker.log import get_logger
log = get_logger(__name__)
from .api import (
get_client,
)
@ -44,6 +49,7 @@ __all__ = [
'open_history_client',
'open_symbol_search',
'stream_quotes',
'norm_trade_records',
]

View File

@ -48,9 +48,7 @@ from piker.brokers._util import (
BrokerError,
DataThrottle,
)
from piker.log import get_logger
log = get_logger(__name__)
from . import log
# <uri>/<version>/
_url = 'https://api.kraken.com/0'

View File

@ -47,11 +47,11 @@ from piker.clearing._messages import (
BrokerdPosition,
BrokerdStatus,
)
from . import log
from .api import (
Client,
BrokerError,
get_client,
log,
normalize_symbol,
)
from .feed import (

View File

@ -46,9 +46,9 @@ from piker.brokers._util import (
from piker.log import get_console_log
from piker.data import ShmArray
from piker.data._web_bs import open_autorecon_ws, NoBsWs
from . import log
from .api import (
Client,
log,
OHLC,
)