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 commit does some re-working on how we expose and curry the
logging config (ILoggerFactory).
The motivation for this PR is that many (most?) Middlewares and
Retry Strategies will need access to the logging config, and it
is very cumbersome to try to pass it in as a constructor arg
to every single one of those. Especially in the pre-built configs,
which currently do not even have direct access to the ILoggerFactory.
To address this we move the ILoggerFactory to be a first-class
member of the IConfiguration itself. We also alter the constructors
for the Configuration class such that it will loop over all of the
Middlewares and the RetryStrategy and set the ILoggerFactory on them
if they do not already have one.
This ensures that customers only ever need to explictly pass the
ILoggerFactory to at most one of the constructors (the Configuration),
but we will have access to it from all of the Middlewares and other
objects that are encapsulated within the Configuration.