Thanks for your help guys .............
I installed P6Spy.
Unfortunately, I ran into a problem, as I am running some legacy code, accessing another non-hibernate database, and this loads the JDBC drivers ....... P6Spy then complains.
Setting the deregisterdrivers=true did not alleviate the problem.
I decided to remove the functionality that required the access to the database via existing JDBC drivers and successfully got the P6Spy to log the sql queries ...........
Unfortunately, P6Spy still returns all of the resultset from a select statement, despite me trying to exclude the resultset:
The spy.log file has the configuration as follows :
1092118793072|-1||debug||com.p6spy.engine.common.P6SpyOptions reloading properties
1092118793088|-1||info||Using properties file: D:\Qmdb\WEB-INF\classes\spy.properties
1092118793088|-1||info||No value in environment for: getStackTrace, using: false
1092118793088|-1||info||No value in environment for: getFilter, using: false
1092118793088|-1||info||No value in environment for: getAppender, using: com.p6spy.engine.logging.appender.Log4jLogger
1092118793088|-1||info||No value in environment for: getInclude, using:
1092118793088|-1||info||No value in environment for: getAppend, using: true
1092118793088|-1||info||No value in environment for: getDeregisterDrivers, using: false
1092118793088|-1||info||No value in environment for: getUsePrefix, using: false
1092118793088|-1||info||No value in environment for: getExecutionThreshold, using: 0
1092118793088|-1||info||No value in environment for: getAutoflush, using: true
1092118793088|-1||info||No value in environment for: getExclude, using:
1092118793088|-1||info||No value in environment for: getExcludecategories, using: info,debug,batch,result
1092118793088|-1||info||No value in environment for: getIncludecategories, using:
1092118793088|-1||info||No value in environment for: getLogfile, using: spy.log
1092118793088|-1||info||No value in environment for: getRealdriver, using: ca.edbc.jdbc.EdbcDriver
1092118793088|-1||info||No value in environment for: getRealdriver2, using:
1092118793088|-1||info||No value in environment for: getRealdriver3, using:
1092118793088|-1||info||No value in environment for: getSpydriver, using: com.p6spy.engine.spy.P6SpyDriver
1092118793088|-1||info||No value in environment for: getDateformat, using:
1092118793088|-1||info||No value in environment for: getDateformatter, using: null
1092118793088|-1||info||No value in environment for: getStringmatcher, using: com.p6spy.engine.common.SubstringMatcher
1092118793088|-1||info||No value in environment for: getStringMatcherEngine, using: com.p6spy.engine.common.SubstringMatcher@14b4b3a
1092118793088|-1||info||No value in environment for: getStackTraceClass, using:
1092118793088|-1||info||No value in environment for: getSQLExpression, using: null
1092118793088|-1||info||No value in environment for: getReloadProperties, using: false
1092118793088|-1||info||No value in environment for: getReloadPropertiesInterval, using: 60
1092118793088|-1||info||No value in environment for: getJNDIContextFactory, using: null
1092118793088|-1||info||No value in environment for: getJNDIContextProviderURL, using: null
1092118793088|-1||info||No value in environment for: getJNDIContextCustom, using: null
1092118793088|-1||info||No value in environment for: getRealDataSource, using: null
1092118793088|-1||info||No value in environment for: getRealDataSourceClass, using: null
1092118793088|-1||info||No value in environment for: getRealDataSourceProperties, using: null
So using P6Spy, I am no better off than when I was logging the output from hibernate directly (other trhan I have got the bound query data) .....
This leads me back to the same question .........
Is there away, preferrably using Hibernate configuration and not P6Spy (due to the problem with having legacy JDBC code) that I can log the sql queries (preferrably with the bound parameters), but not log the result set ..........
I have tried setting :
### log JDBC bind parameters ###
log4j.logger.net.sf.hibernate.type=info
### Log the SQL
log4j.logger.net.sf.hibernate.SQL=debug
But I still always get the result set ..........
Alternatively, and I know this is not the correct forum, is there some settings I can use in P6Spy to acheieve what I want ...... or soem other tool ........
Thanks for your help,
Mike.
|