Hacker News new | ask | show | jobs
by sakopov 536 days ago
This is how .net does this as well. You write logs via ILogger interface and then wire it up to a logging library of any flavor.
1 comments

ILogger is not in the BCL. Its part of the Microsoft.Extensions family of libraries.
Though today much of the Microsoft.Extensions family is considered BCL by most users, especially in the way it is documented as "Core functionality" (the "Generic Host" model uses a lot of Microsoft.Extensions, up front in .NET documentation today) and also in the way that the majority of it (especially in this case of Microsoft.Extensions.Logging) is source controlled side-by-side with most of the BCL, including almost all of System.**: https://github.com/dotnet/runtime/tree/main/src/libraries

(There are some of Microsoft.Extensions that exist outside of dotnet/runtime in dotnet/extensions: https://github.com/dotnet/extensions/tree/main/src/Libraries)