Hello,
Quite an useful text.

One thing I can't agree with:

"I recommend skipping the generalization if possible. You will have more control over log4j if you use it directly. You cannot execute log4j's PropertyConfigurator.configure( "/etc/log4j.properties" ) at your leisure if using "commons-logging"."

You can use JCL everywhere except the config part where you use Log4j directly. If you're forced to change logging api you only have to change one or two files instead of the whole project.

Speaking of best practices - is it really better to use things like

logger.debug("The entry is {}.", entry);

instead of

if(logger.isDebugEnabled()) { logger.debug("Entry number: " + i + " is " + String.valueOf(entry[i]));
}

Sure the first one is shorter, but isn't the second one faster?


Greetings, Lilianne E. Balze


Julius Davies wrote:
Here's a page of what I consider log4j best practises:

http://juliusdavies.ca/logging.html


Any comments are very welcome!




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to