I'm having trouble getting Apache Commons Digester to log anything. I'd be hugely grateful for any light anyone can shed.
In my code I'm doing this:
Digester digester = new Digester();
// some Digester set up stuff
// What on earth should go in here????
digester.setLogger(LogFactory.getLog("org.apache.commons.logging.Log"));
I have a commons-logging.properties
file in my classpath as follows:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester=debug
org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester.sax=info
I just get no debug info at all.
Thanks for your help!
Update:
Thanks for the answer bwawok - that's what the problem was.
In the docs for Digester, they suggest that you can just enable the SimpleLog
of commons-logging. Unfortunately, the Digester
doesn't appear to output any INFO messages, only DEBUG, and at least on eclipse, SimpleLog
doesn't output DEBUG messages at all! The result was no INFO messages (because Digester
sends none) and no DEBUG messages (because SimpleLog
doesn't forward them!) Once I switched to log4j, all the debug messages came spewing out! Thanks again.