I have a program that updates tables in a database using prepared statements, and I'm trying to see the output of all the SQL statements that are implemented.
My research suggested P6Spy which looked great, I downloaded it, added the P6Spy.jar as a dependency in my library, modified to the spy.properties file to connect to use the oracle driver as the realdriver, added the spy.properties to my classpath, and changed the driver to "com.p6spy.engine.spy.P6SpyDriver" in my code.
It all works, the spy.log file is generated BUT it DOES NOT CONTAIN THE SQL STATEMENTS. Instead, the output in the spy.log file is :
1374244954573|-1||debug||com.p6spy.engine.common.P6SpyOptions reloading properties
1374244954578|-1||info||Using properties file: C:\Users\gboss\logging\spy.properties
1374244954579|-1||info||No value in environment for: getStackTrace, using: false
1374244954579|-1||info||No value in environment for: getDeregisterDrivers, using: false
1374244954579|-1||info||No value in environment for: getUsePrefix, using: false
1374244954579|-1||info||No value in environment for: getExecutionThreshold, using: 0
1374244954579|-1||info||No value in environment for: getAutoflush, using: true
1374244954579|-1||info||No value in environment for: getExclude, using:
1374244954579|-1||info||No value in environment for: getExcludecategories, using: info,debug,result,batch
1374244954579|-1||info||No value in environment for: getFilter, using: true
1374244954579|-1||info||No value in environment for: getInclude, using:
1374244954579|-1||info||No value in environment for: getIncludecategories, using:
1374244954579|-1||info||No value in environment for: getLogfile, using: c:/spy.log
1374244954579|-1||info||No value in environment for: getAppender, using: com.p6spy.engine.logging.appender.FileLogger
1374244954579|-1||info||No value in environment for: getRealdriver, using: oracle.jdbc.driver.OracleDriver
1374244954579|-1||info||No value in environment for: getRealdriver2, using:
1374244954580|-1||info||No value in environment for: getRealdriver3, using:
1374244954580|-1||info||No value in environment for: getAppend, using: true
1374244954580|-1||info||No value in environment for: getSpydriver, using: com.p6spy.engine.spy.P6SpyDriver
1374244954580|-1||info||No value in environment for: getDateformat, using:
1374244954580|-1||info||No value in environment for: getDateformatter, using: null
1374244954580|-1||info||No value in environment for: getStringmatcher, using: com.p6spy.engine.common.SubstringMatcher
1374244954580|-1||info||No value in environment for: getStringMatcherEngine, using: com.p6spy.engine.common.SubstringMatcher@13aaa14a
1374244954580|-1||info||No value in environment for: getStackTraceClass, using:
1374244954580|-1||info||No value in environment for: getSQLExpression, using: null
1374244954580|-1||info||No value in environment for: getReloadProperties, using: false
1374244954580|-1||info||No value in environment for: getReloadPropertiesInterval, using: 60
1374244954580|-1||info||No value in environment for: getJNDIContextFactory, using: null
1374244954580|-1||info||No value in environment for: getJNDIContextProviderURL, using: null
1374244954580|-1||info||No value in environment for: getJNDIContextCustom, using: null
1374244954580|-1||info||No value in environment for: getRealDataSource, using: null
1374244954580|-1||info||No value in environment for: getRealDataSourceClass, using: null
1374244954580|-1||info||No value in environment for: getRealDataSourceProperties, using: null
does anyone have experience using P6Spy and know what the issue is? I've read that the spy.log is just supposed to generate the sql statements after doing all the things I did and running the program, so I'm pretty confused here
EDIT -- The database was updated by the way, so the SQL statements did go through and update the database