Reduce unrequired live logs for derivatives chains #8458
Merged
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.
Description
Reduce unrequired logs for derivatives chains (futures and options) by logging once per parent canonical symbol per update procedure. The method
Log.Trace()
has an optional parameter calledoverrideMessageFloodProtection
that prevents the method to log the same message more than once. Thus, I changed the log messages inLiveMappingEventProvider.GetEvents()
,LiveTradingRealTimeHandler.RefreshMarketHours()
andLiveTradingRealTimeHandler.RefreshSymbolProperties()
, to use the canonical symbol if the security symbol had it.Related Issue
Closes #8411
Motivation and Context
With this change, less messages will be logged helping the user to focus on the relevant logs
Requires Documentation Change
N/A
How Has This Been Tested?
I tested my changes running the regression algorithm
BasicTemplateOptionsAlgorithm
on paper-live mode and asserting the unrequired logs were gone.Types of changes
Checklist:
bug-<issue#>-<description>
orfeature-<issue#>-<description>