Figured it out...

If I have a common-loggings.properties file in our WEBINF/classes directory 
with the single entry...

org.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger


And I have a log4j.properties file in our WEBINF/classes directory with the 
following ( modify as needed )

log4j.logger.org.apache.xindice = INFO, org.apache.xindice

log4j.additivity.org.apache.xindice = false

log4j.appender.org.apache.xindice=org.apache.log4j.RollingFileAppender
log4j.appender.org.apache.xindice.File=c:/application/logs/Xindice/trace_Xindice.txt
log4j.appender.org.apache.xindice.MaxFileSize=3000KB
log4j.appender.org.apache.xindice.layout=org.apache.log4j.PatternLayout
log4j.appender.org.apache.xindice.layout.ConversionPattern=%5p %d [%t] - %m%n
log4j.appender.org.apache.xindice.MaxBackupIndex=1

All the logging goes to the application/logs/Xindice directory.

sweet.



>  -----Original Message-----
> From:         Kurt Kavanaugh  
> Sent: Tuesday, February 10, 2004 3:38 PM
> To:   Xindice users (E-mail)
> Subject:      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?
> 
> 
> 

Reply via email to