nreco / logging

Generic file logger for .NET Core (FileLoggerProvider) with minimal dependencies
MIT License
284 stars 56 forks source link

NReco's FileLoggerExtensions should NOT be in the Microsoft.Extensions.Logging namespace. #61

Closed jwdonahue closed 8 months ago

jwdonahue commented 8 months ago

NReco's FileLoggerExtensions should NOT be in the Microsoft.Extensions.Logging namespace.

The Microsoft and System namespaces are reserved for Microsoft's use. You can extend their classes in your own namespace, or issue a PR to the appropriate .NET repo, and avoid creating many hard to debug issues in your customer's code. What will you do if Microsoft decides to add an AddFile method of their own making to ILoggingBuilder? Ya, that's unlikely, but what about all the other third parties out there? Fixing this is probably a breaking change for you, but the sooner you take that hit, the better for everybody in the .NET ecosystem.

https://softwareengineering.stackexchange.com/a/400198/286679 https://stackoverflow.com/a/3991281/3150445

VitaliyMF commented 8 months ago

Shipped in 1.2.0