If you write a custom appender for log4j, you should be able to access this information. This would require some parsing on your end. Another possibility is to write your own proxies for Connection/Statement/PreparedStatement and provide custom factories for this.
Hope this helps, Niels ________________________________ From: joson yu [mailto:[email protected]] Sent: Monday, January 05, 2009 1:26 PM To: [email protected] Subject: Re: about log sql hi ,niels. i think you have miss my question.i know how to log the sql to the console,but now,i need the way to get the sql and save it in the db in my app .you know that the log manager system need to record the infomation for analysis.
