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

feat: simplify logging configuration #288

Merged
merged 1 commit into from
Oct 10, 2022
Merged

feat: simplify logging configuration #288

merged 1 commit into from
Oct 10, 2022

Conversation

cprice404
Copy link
Contributor

Kenny called out on a previous PR that there was some code smell in the way I was managing the logging factories for the various components of the configuration.

This commit reworks things slightly so that the user still only has to pass in the ILoggerFactory in one spot in our pre-built configs, but we now just pass that directly through to the constructors of the other things that need it. This allows us to get rid of the getters and copy constructors that we had previously exposed.

Base automatically changed from implement-retries to main October 7, 2022 21:38
kvcache
kvcache previously approved these changes Oct 7, 2022
Copy link
Contributor

@kvcache kvcache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great to me. I think IMiddleware is significantly better this way, and it's more clear to me now how to configure logging. The burden of invoking a static function instead of invoking a property to me seems very light and a welcome price to pay for the clarity.

malandis
malandis previously approved these changes Oct 7, 2022
Copy link
Contributor

@malandis malandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like how the retry logic ended up

Kenny called out on a previous PR that there was some code smell
in the way I was managing the logging factories for the various
components of the configuration.

This commit reworks things slightly so that the user still
only has to pass in the ILoggerFactory in one spot in our
pre-built configs, but we now just pass that directly through
to the constructors of the other things that need it.  This
allows us to get rid of the getters and copy constructors
that we had previously exposed.
@cprice404
Copy link
Contributor Author

rebased

@cprice404 cprice404 merged commit 8709c3f into main Oct 10, 2022
@cprice404 cprice404 deleted the clean-up-logging branch October 10, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants