.net - Are there any alternatives to Common.Logging? -


edit: common.logging 2.1.1 released on june 9, 2012 , github page active, author commenting on health of project.

we're looking @ using common.logging in new .net project i'm bit concerned project seems have become inactive. homepage last updated in 2009 , latest version available on sourceforge created in 2010. i've found incompatibility nlog 2 , i'm concerned may become bigger problem on time. have noticed enterprise library 5.0 isn't listed being compatible i've not tried it.

are there other alternatives provide similar common interface?

i have been using common.logging 4 years, , i'm able use nlog2. answer question thoroughly, need take closer @ common.logging first. common.logging gives 2 benefits:

  1. since 1.x, common.logging let write application independent of logging framework. can change 1 logging framework without recompiling application. particular useful development of common library, may used various applications use different logging frameworks.

  2. starting 2.x, common.logging let aggregate logging information various logging frameworks. let's developing application , want leverage 2 3rd part libraries, a3rd.dll , b3rd.dll. a3rd.dll uses log4net, b3rd.dll uses nlog. how consolidate log information a3rd.dll , b3rd.dll 1 log file (or log monitoring system)? common.logging can help, example, can capture log message nlog , send on log4net, , let log4net write log file or send anywhere log4net can do.

now, nlog2. logging api in nlog2 backward compatible nlog1, api configuration , targeting changed. if need send log message nlog2, can assembly redirect (see answer here: can nlog v2 used common.logging).

that being said, if want aggregate nlog2 message other logging framework using common.logging, assembly redirect approach won't work. nlog2 specific adapter has created.

like @kugel said, inactive mean stable , mature. common.logging works various logging framework, unlikely release new version every time 1 of supported logging framework makes release. otherwise more confusion help. hence, assembly redirect should considered first. when there incompatibility issue arise, mentioned nlog2 message redirecting, send email mailing list , i'm sure jump in , help.

cheers, kenneth


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -