File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Logging SQL statements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Logging SQL statements " Watch "Logging SQL statements " New topic
Author

Logging SQL statements

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
Hi,
I can see all logged(DEBUG, ERROR, INFO, etc) statements on log files, but I can't see the SQL statments, parameters, and result set values.

I can see those also after I set up in IBM websphere admin console. here my question I want to see them on my log files how?
please see the log4j setup in log4j.properties file.



please some give me the idea to produce SQL statements too on my logs


Thanks,
Kumar
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
Anyone please reply to this
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
In log4j logging file you will see only those logs, which are directed to it. In all probability your JDBC driver does not emit logging statement, thats why SQLs are not part of log file.


My Blog
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
thank you vinod,

but I can set the logs in IBM websphere console and I can see server's log file (trace.log). then why it's not possible in our application logs?
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
p6spy may help you, have a look at that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging SQL statements
 
Similar Threads
Problem with Tomcat 5.5
log4j - dailyrollingfileappender
thread safe logging in a servlet
Log4j logs debug into info...
Logging