• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logging SQL statements

 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone please reply to this
 
Vinod K Singh
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
p6spy may help you, have a look at that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic