-
Couldn't load subscription status.
- Fork 3.3k
Closed
Milestone
Description
This has the following advantages:
- It eliminates internal service provider explosion when calling
UseLoggerFactorywith a new instance each time. This is currently a significant pit of failure that has consumed many victims. - This also means that the testing pattern of multiple external service provides (e.g. one per test) does not cause the internal cache to explode.
- It allows a simple implementation for simple logging APIs, since each context instance can naturally have its own logger if desired.
The disadvantages are:
- Internal singleton services cannot depend directly on a logger from D.I. This means either:
- Making the service scoped
- Flowing in the logger from a scoped service, which in turn may require breaking changes to add new logging