Ashish Naik wrote:
I am not able to understand how to confifigure Log4J for Commons logging
API.

I have added log4j.jar to my classpath. How do I set
log4j.configuration=log4j.properties

I am refering to Logging User Guide at
http://jakarta.apache.org/commons/logging/guide.html


Hi!

You need two separate configuration files - one for commons-logging and one for log4j.

The configuration file for commons-logging needs to be named commons-logging.properties and in your case, since you want to use log4j, the content of the file should be:
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory


That will tell commons-logging that you want to use log4j as your logging implementation.

You can then configure log4j as you normally do in the file log4j.properties.


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



Reply via email to