[logback-user] Comparison between log4j and logBack

ivancaspeta at cox.net ivancaspeta at cox.net
Fri Oct 5 01:09:05 CEST 2007


Hi,

We, myself included, just recently performed some research of the various logging tools available for Java; for whatever reason we did not include LogBack (honestly I did not read about it until today!).

Anyways, as you can imagine, we have chosen log4j as our tool for logging, but we have not started implementation as of yet (we would be replacing an in-house tool and there are some other things to iron out first), so I would like to ask if there is a comparison matrix/table/doc between log4j and logBack.

Some of our selection criteria include:
1.	Several trace levels such as Fatal, Error, Warning, Info, Debug, Verbose, etc. 
2.	Ability to apply multiple filters, for example, have VERBOSE tracing turned on for Business Logic, and Terse for DAOs, and Error for everything else. 
3.	Alternate modes for output
4.	Automatic method/class resolution, so I don’t have to enter that in the code  
5.	Ability to collect trace remotely 
6.	helper methods for string substitution 
7.	Ability to route trace to different files … put all Errors in File A, and at the same time Events and Errors in File B. 
8.	Log other attributes like Thread Id, Class, etc.
9.	Low overhead to performance, “No logging” and “Logging, but disabled” should perform about the same, within 5% of each other. 
10.	Ability to turn logging on/off without re-starting
11.	Ability to change logging levels while app is running; i.e., don't need to restart
12.	Can be bundled at no cost, licensing is acceptable.
13.	Configuration should not be rocket science
14.	Chainsaw integration/support
15.	UDP Support
16.     Ability to trace a context, like an Item (NDC).

I am reading as much doc as I can, but I would like to know why should we use logBack instead of log4j as the latter is widely used and popular among the Java community.

Thanks for any input provided.

Ivan C



More information about the Logback-user mailing list