It makes me actively disinterested in these libraries. I just want some built in interface with levels, hierarchy, and structured logging
It makes me actively disinterested in these libraries. I just want some built in interface with levels, hierarchy, and structured logging
In Java it is common to use the MDC support of slf4j. You can add to metadata in thread local variables, so that you don't have to add it at every logging site.
It probably has the most complex and messy logging story of any language - but at least the solutions are very mature at this point.
Though I myself prefer Log4J2, as I'm already using Log4J2 as the concrete logging implementation.
The API of Log4J2 and SLF4J v2 are similar enough that it does not matter for basic usage, I don't see the benefit of SLF4J in a project that's already using Log4J2.
(There are some of Microsoft.Extensions that exist outside of dotnet/runtime in dotnet/extensions: https://github.com/dotnet/extensions/tree/main/src/Libraries)