kreeben / resin

Vector space index based search engine that's available as a HTTP service or as an embedded library.
MIT License
568 stars 40 forks source link

Replace log4net with microsoft.extensions.logging.abstractions #49

Closed bravecobra closed 4 years ago

bravecobra commented 7 years ago

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.

mxmissile commented 7 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/

bravecobra commented 7 years ago

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!

bravecobra commented 7 years ago

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.

kreeben commented 7 years ago

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?

kreeben commented 6 years ago

Fixed here: https://github.com/kreeben/resin/commit/5f85425a0f61bbfbe2b2676d71d72f37677a0bef

kreeben commented 4 years ago

Sorry for closing issue without fully addressing the issue (of not using a MS standardized logging interface).

kreeben commented 4 years ago

Fixed here: https://github.com/kreeben/resin/commit/b36c01ed2afd950d9f8f2d6a0860d6ba4a730906