Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

p6spy - settings  RSS feed

Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following questions related to the log that gets generated by p6spy using

I have en entry in as:
As such, file called spy.log genst generated under C: drive.

Following are my questions:

1. How can I capture the start time and the end time of SQL in spy.log (logfile=c:\\spy.log)? Can I capture these two values by making certain configurations in Please show me how.

2. What do I have to do so that the result and resultSet related to the query does not get displayed in spy.log (logfile=c:\\spy.log)file? I only want to see the prepared statement and the preparedstatement with the value. I do not want to see the result generated from the SQL in the spy.log.

How can I accomplish the above by changing settings in

In other words, I want to see only the following entries in spy.log:

select col1 from table1 where id=?
select col1 from table1 where id=1

I do not want to see the result returned from the above query in spy.log.

3. If I point the logfile attribute in to the output file of log4j, will both log4j and p6spy write to the same (single) log file?

In other words, if I add the following in

Will both p6spy and log4j write the the above mylog4j.log file?

4. What are the place holder values in between the first few pipes in the log file that gets generated by p6spy?

For example, in the output that is written to spy.log, what attribute is being presented inside each of these pipes?


5. What do I have to do, if I do not want the formatting with pipe (e.g. 1225296359390|-1||debug||) that p6spy generates? Instead, I would like the formatting similar to the one generated by log4j. What modifications in do I need in oprder to accomplish this?

6. What do I have to do to have p6spy generate the same formatting as that of my existing log4j formatting? Do I have to make same entries log4j specific entries in

In, I have commented out the following at this time:

#The following are for log4j logging only
#log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n

Do I have to uncomment the above entries in and set them up similar to my log4j properties, in order for p6spy to generate log similar to my log4j?

7. What do I need to do to capture the time taken to run sql, while using log4j type of logging? Bt default, p6spy shows the duration of SQL as a value of inside one of the pipes. But if I want to make p6spy log similar to my log4j file, but still want to capture the duration of SQL, what do I need to do?

8. What should be my setting for includecategories and excludecategoriesShould, if I want to display every possible SQL?

Following is my file:
include =
exclude =
sqlexpression =
autoflush = true
#The following are for log4j logging only
#log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!