You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Kurt Kavanaugh <kk...@teletrol.com> on 2004/02/10 21:38:25 UTC

logging to Xindice log vs root logger/STDOUT

We are using log4j, Xindice, tomcat and apache and have separate logs for each application stored in a single logs directory for convenience. 

My question is this I would like to have the Xindice log information directed to a log file in our standard logs directory.

Note I have looked at the sources and see that in Database.java at least the logger requested is...

private static Log log = LogFactory.getLog("org.apache.xindice.core");

So seeing the import statement above I see the use of the org.apache.commons.logging.LogFactory class.

If I set my commons-logging.properties file to...

org.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
and setup loggers in my log4j.properties that match "org.apache.xindice.core" will I see the logging directed appropriately?




Re: logging to Xindice log vs root logger/STDOUT

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Kurt Kavanaugh wrote:

>We are using log4j, Xindice, tomcat and apache and have separate logs for each application stored in a single logs directory for convenience. 
>
>My question is this I would like to have the Xindice log information directed to a log file in our standard logs directory.
>
>Note I have looked at the sources and see that in Database.java at least the logger requested is...
>
>private static Log log = LogFactory.getLog("org.apache.xindice.core");
>
>So seeing the import statement above I see the use of the org.apache.commons.logging.LogFactory class.
>
>If I set my commons-logging.properties file to...
>
>org.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
>and setup loggers in my log4j.properties that match "org.apache.xindice.core" will I see the logging directed appropriately?
>  
>

I have not used properties file but system property works ok for me (I'm 
using LogKit):
    
org.apache.commons.logging.Log=org.apache.commons.logging.impl.LogKitLogger

So I guess properties file should work too.

Vadim