Particular / NServiceBus

Build, version, and monitor better microservices with the most powerful service platform for .NET
https://particular.net/nservicebus/
Other
2.07k stars 648 forks source link

Obsolete NServiceBus.Logging in favor of Microsoft.Extensions.Logging #7038

Open ramonsmits opened 3 months ago

ramonsmits commented 3 months ago

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

NServiceBus.Logging exists in all versions of Core. Its a logging abstraction by NServiceBus that is from the time the .NET ecosystem didn't have a defacto abstraction. Now that Microsoft.Extensions.Logging has matured there is no reason for NServiceBus users to use its abstraction.

This also fixes issues with NServiceBus.Logging.LogManager being a service locator pattern and any loggers created could conflict when multiple endpoints are hosted in a single process

Suggestion

Mark all public types in NServiceBus.Logging with [Obsolete]with guidance to transition toMicrosoft.Extensions.Logging`

Additional Context

No response

Related

Currently abstraction blocks certain refactorings like: