Skip to content
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

fix: re-work logging config #278

Merged
merged 1 commit into from
Oct 6, 2022
Merged

fix: re-work logging config #278

merged 1 commit into from
Oct 6, 2022

Commits on Oct 6, 2022

  1. fix: re-work logging config

    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.
    cprice404 committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    a5f4459 View commit details
    Browse the repository at this point in the history