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``. wrapping around ``ib_insync``.
''' '''
from piker.log import get_logger
log = get_logger(__name__)
from .api import ( from .api import (
get_client, get_client,
) )
@ -44,6 +49,7 @@ __all__ = [
'open_history_client', 'open_history_client',
'open_symbol_search', 'open_symbol_search',
'stream_quotes', 'stream_quotes',
'norm_trade_records',
] ]

View File

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

View File

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

View File

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