Hi all, I've got a doubt about datasource logging mechanism. I use log4j for my web application, and, at debug level, I'd like to make datasources logs to use log4j. I thought I could use the DataSource.setLogWriter method, but maybe I was wrong. Before trying to take log4j in the scene (writing a class to wrap the Logger.log inside a PrintWriter), I did a try with a simple PrintWriter:
dataSource.setLogWriter(new PrintWriter(System.out, true)), but I didn't see nothing new on the screen. Ok, I said, let's go a bit deeper. dataSource.getClass() returns org.apache.commons.dbcp.BasicDataSource (and from the source I've seen that get/setLogWriter methods do what I expected), and if I try dataSource.getLogWriter().println("FOO") I actually see the string "FOO" on my stdout.log file. So I'm wandering if Tomcat uses the datasource logwriter anywhere. I took a glimpse to Tomcat source but I get myself lost soon. Is there a sort of log level to raise somewhere (in the xml context file, for instance), or I'm not going to see any useful information? Thank you for your attention. Regards, Lorenzo Benvenuti -- Lorenzo Benvenuti Gruppo Servizi Management Systems Via Farnesi, 141 55100 Lucca tel. (+39)058396811 fax. (+39)058391199 e-mail: [EMAIL PROTECTED] http://www.grupposervizi.it --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]