-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python logging switch #1279
Merged
robcarver17
merged 24 commits into
robcarver17:develop
from
bug-or-feature:python_logging_switch
Dec 5, 2023
Merged
Python logging switch #1279
robcarver17
merged 24 commits into
robcarver17:develop
from
bug-or-feature:python_logging_switch
Dec 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…es instead of copying the logger instance. Adds TODO comments for the remaining ones
…ttribute to 'base_system' logger
…ttribute to 'base_system' logger
Setting to draft while I dig into #1278 |
# Conflicts: # sysexecution/algos/algo_original_best.py # sysexecution/algos/common_functions.py # sysexecution/stack_handler/spawn_children_from_instrument_orders.py # systems/provided/dynamic_small_system_optimise/optimisation.py
Setting to draft while conflicts are resolved |
# Conflicts: # sysbrokers/IB/client/ib_client.py # sysbrokers/IB/client/ib_contracts_client.py # sysbrokers/IB/client/ib_price_client.py # sysbrokers/IB/config/ib_instrument_config.py # sysbrokers/IB/ib_futures_contract_price_data.py # sysbrokers/IB/ib_orders.py # sysbrokers/broker_capital_data.py # sysdata/arctic/arctic_futures_per_contract_prices.py # sysdata/futures/contracts.py # sysdata/futures/futures_per_contract_prices.py # sysexecution/algos/algo.py # sysexecution/algos/common_functions.py # sysexecution/stack_handler/balance_trades.py # sysexecution/stack_handler/create_broker_orders_from_contract_orders.py # sysexecution/stack_handler/spawn_children_from_instrument_orders.py # sysexecution/strategies/strategy_order_handling.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes a start at refactoring
log.setup()
from pst_logger. The pattern is pretty much the same in each case. The old way would make a copy of thepst_logger
, setting new attributes at the same time. In most cases, the new way is to pass temporary log attributes into the logging call, those attributes only being active for one call. There were a few other cases where the result oflog.setup()
was ignored, duplicated or not used.This PR does not refactor all instances of
log.setup()
, just the easy ones. The few remaining ones are more complex, usually because the logger instance is passed around to other functions. Those will follow in another PR; they are separated in case the solution is disputed.This PR also includes changes to remove
pst_logger
type hints, some docs updates, and some TODOs for the remaining logging switch changes