It would cool to use the logging lib provided by https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1?view=aspnetcore-2.2.
we may provide some higher level abstractions in the future, including for ASP.NET, and we may make use of this there. we definitely won't add it to the core library because we care a lot about maintaining the widest possible compatibility and keeping dependencies to a minimum (this dependency requires .net core).
For the newest version of the interface only netstandard 2.0 is required. https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions/2.2.0
Beside, It would great to be able to replace the Console.WriteLine. For example, to allow user to set a logger in a consumer builder. It could be a small logging interface.
the core library is currently compatible with netstandard1.3 and net451 - there is a lot of demand for this, it doesn't make sense to give this up for small convenience in logging in some scenarios. You can use SetLogHandler to implement any log handling code you like (which will override the logging to stderr, which librdkafka does by default). In the future, we may provide an abstraction that uses Microsoft.Extensions.Logging out of the box for use with asp.net, but we haven't done this yet.
Most helpful comment
the core library is currently compatible with netstandard1.3 and net451 - there is a lot of demand for this, it doesn't make sense to give this up for small convenience in logging in some scenarios. You can use
SetLogHandlerto implement any log handling code you like (which will override the logging to stderr, which librdkafka does by default). In the future, we may provide an abstraction that uses Microsoft.Extensions.Logging out of the box for use with asp.net, but we haven't done this yet.