PDA

View Full Version : No log4net anymore? Why?


rolandz
11-20-2006, 07:15 AM
Hi,

I've been out of work for one month and now I see that there is no log4net in the spring anymore. When this decision has been taken and what is the reason for removal this logging llibrary from spring?

TIA

lahma
11-20-2006, 07:58 AM
I think that Spring team isn't going to "remove log4net", they are just abstracting the dependency away. Spring will only depend on Common.Logging.dll and you can plug your own implementation of logging (log4net, Enterprise Library). I think that latest nightly build has some support for delegating to log4net.

-Marko

Mark Pollack
11-27-2006, 05:07 PM
Hi,

Yes that is right. We removed all dependencies on log4net and now depend on 'Commong.Logging' which will move to another project site shortly. The main reason is that there are many logging libraries, so if you don't use log4net then you have two seperate log files...config..etc.

If you want to use log4net you will need to place either Common.Logging.Log4NET129.dll or Common.Logging.Log4Net for 1.2.10. There need for two is because log4net changed the key they use to sign their assemblies from 1.2.9 to 1.2.10. You can take a look at this posting for config information (http://forum.springframework.net/showthread.php?t=861) or the example apps. I'll be adding it to the docs for the PR3 release next week.

Just ping here if you are running into trouble. What logging library are you using?

Mark

oscar.thornell@gmail.com
12-04-2006, 09:14 PM
Hi,

Thanks a bunch for removing log4net from Spring! Not that I think it´s bad or anything..I just never liked that a framework like Spring where dependend/hard wired upon other 3rd party projects. Seemed a bit silly, loose coupling and all :-)

Have anyone succesfully used Entlib logging together with Spring?

Mark Pollack
12-05-2006, 07:02 AM
Hi,

Glad to finally have that monkey off my back as well :)

I believe some people have used EntLib logging with Spring and ended up with two log streams, the log4net and EntLlib one. Writing a Common.Logging implementation for EntLib logging should be very straightforward. I believe that Bruno is working on a NLog version.

Mark

Nop
03-02-2007, 09:17 AM
Hi.
When are Spring Framework .NET developers going to add support NLog via Common.Logging?

Aleks Seovic
03-02-2007, 10:56 AM
Hopefully in the very near future :)

It's not very difficult to implement support for different frameworks, it just wasn't high priority for us. What we really wanted was to get dependency on log4net out while providing suitable replacement, which is why only log4net implementations of common.logging interfaces were created.

As a side note, Common.Logging now lives as a separate project at http://netcommon.sf.net, so people other than Spring team can contribute implementations for various loggers ;)

- Aleks

Bruno Baia
03-16-2007, 09:32 PM
Hi,

NLog support have been added, it will be available in the next Common.Logging version.
Anyway you can get the code from netcommons source control ( SVN (http://sourceforge.net/svn/?group_id=182424) )


Bruno

Bruno Baia
10-11-2007, 01:11 AM
Hi,

Mark just added EntLib support to Common.Logging.
Get Common.Logging 1.2 from http://netcommon.sf.net

Spring.NET 1.1 RC2 will use that version.

- Bruno

lahma
10-11-2007, 06:50 AM
This is great news! I was thrown to project where they insist on using EntLib logging and now I have a more sane, uniform interface to work with :)

Great work!

-Marko

Mark Pollack
10-11-2007, 07:01 AM
Hi,

FYI, there are some negatives to using Common.Logging as you don't get to use the full power of the logging system. It is truely a least common denominator, so my advice in terms of application code would be to think carefully about what you are giving up and/or if you think portable logging API calls are your highest priority.

Cheers,
Mark