Closed bravecobra closed 4 years ago
You can use your own logger with log4net last I checked...
http://www.alteridem.net/2008/01/10/writing-an-appender-for-log4net/
Sure, I know that works, but I don't want to drag in an extra logging library, when I already have (another) one fully working. Packages should not implement/dependent on a concrete logging library, but should log to an abstraction of it and let the actual logging be as a responsibility of the application that uses the package. In other words, freedom of choice!
Another alternative might be liblog which is an abstraction especially for 3rd party libraries (https://github.com/damianh/LibLog). Both do basically the same: provide a logging abstraction.
Thank you for taking an interest in the Resin codebase and sorry for waiting a month before answering.
@bravecobra Sure, I'm also allergic to dependencies. I f-ing love log4net though. Didn't realize not all people use it. What would you prefer, between the two alternatives you gave, as a means for a logging abstraction layer?
Sorry for closing issue without fully addressing the issue (of not using a MS standardized logging interface).
Please replace log4net as a dependency with https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions That allows you to use the logger of your application instead hard depending on a specific logger. It's up to the application to configure logging not the library.