-
Notifications
You must be signed in to change notification settings - Fork 470
ILogger implementation #158
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
Conversation
Should we be taking an I'm not very familiar with |
We should, however that would force the end user to pass down those typed loggers, that was one of the concerns in my first PR. The problem is without DI or a Factory pattern the typed loggers are clunky to use. That was one of the reasons I was looking at the Factory anti pattern, then we could free use the logger everywhere and if the user wanted they could just register thier ILoggerFactory and get access to it all, and ass and Filters etc Then we could use typed/scoped loggers without them needing to pass it down everywhere God I love to hate logging |
Ah sorry, I missed that in your first PR. How "clunky" are we talking? Could you show an example? |
pudo code, but example, say context and executor both had typed loggers in the constructor, you would need to create to loggers to do simple tasks
|
Oh I was imagining way worse than that! I think that's fine personally. If people really hate then can easily work around it in the future (e.g. add another constructor that just accepts non-generic ILogger, or one which accepts an ILoggerFactory as you suggested), but I don't think that's likely to be needed. |
Then nesting also becomes an issue, if Executor creates a class that also has its typed logger, how do we pass it down? I think it has to be ILogger? or we create the |
The we could add a global Edit: Regret opening this can of worms :p |
Agreed 😆 Let's just stick with I'll merge this if you agree? |
yep, happy to megre and run, lol |
As talked about in PR #157 replace the in-built logger for the Microsoft ILogger framework
Some nuget updates were required along the way