日期:2014-05-19  浏览次数:21064 次

hibernate + spy spy.log日志不显示sql
控制台有log4j的sql日志输出,但spy.log中没有信息,是什么原因呢?


spy.log信息如下:

1328804166484|-1||debug||com.p6spy.engine.common.P6SpyOptions reloading properties
1328804166500|-1||info||Using properties file: F:\apache-tomcat-6.0.30\webapps\***\WEB-INF\classes\spy.properties
1328804166500|-1||info||No value in environment for: getStackTrace, using: false
1328804166500|-1||info||No value in environment for: getFilter, using: false
1328804166500|-1||info||No value in environment for: getAppender, using: com.p6spy.engine.logging.appender.FileLogger
1328804166500|-1||info||No value in environment for: getInclude, using: 
1328804166500|-1||info||No value in environment for: getAppend, using: true
1328804166500|-1||info||No value in environment for: getDeregisterDrivers, using: false
1328804166500|-1||info||No value in environment for: getUsePrefix, using: false
1328804166500|-1||info||No value in environment for: getExecutionThreshold, using: 0
1328804166500|-1||info||No value in environment for: getAutoflush, using: true
1328804166500|-1||info||No value in environment for: getExclude, using: 
1328804166500|-1||info||No value in environment for: getExcludecategories, using: 
1328804166500|-1||info||No value in environment for: getIncludecategories, using: 
1328804166500|-1||info||No value in environment for: getLogfile, using: spy.log
1328804166500|-1||info||No value in environment for: getRealdriver, using: oracle.jdbc.driver.OracleDriver
1328804166500|-1||info||No value in environment for: getRealdriver2, using: 
1328804166500|-1||info||No value in environment for: getRealdriver3, using: 
1328804166500|-1||info||No value in environment for: getSpydriver, using: com.p6spy.engine.spy.P6SpyDriver
1328804166500|-1||info||No value in environment for: getDateformat, using: 
1328804166500|-1||info||No value in environment for: getDateformatter, using: null
1328804166500|-1||info||No value in environment for: getStringmatcher, using: com.p6spy.engine.common.SubstringMatcher
1328804166500|-1||info||No value in environment for: getStringMatcherEngine, using: com.p6spy.engine.common.SubstringMatcher@332031
1328804166500|-1||info||No value in environment for: getStackTraceClass, using: 
1328804166500|-1||info||No value in environment for: getSQLExpression, using: null
1328804166500|-1||info||No value in environment for: getReloadProperties, using: false
1328804166500|-1||info||No value in environment for: getReloadPropertiesInterval, using: 60
1328804166500|-1||info||No value in environment for: getJNDIContextFactory, using: null
1328804166500|-1||info||No value in environment for: getJNDIContextProviderURL, using: null
1328804166500|-1||info||No value in environment for: getJNDIContextCustom, using: null
1328804166500|-1||info||No value in environment for: getRealDataSource, using: null
1328804166500|-1||info||No value in environment for: getRealDataSourceClass, using: null
1328804166500|-1||info||No value in environment for: getRealDataSourceProperties, using: null
1328804166500|-1||info||reloadProperties() successful
1328804166609|-1||debug||Registered driver: oracle.jdbc.driver.OracleDriver, realdriver: oracle.jdbc.driver.OracleDriver@469b16
1328804166609|-1||debug||Registered factory: com.p6spy.engine.logging.P6LogFactory with options: null
1328804166609|-1||debug||Driver manager reporting driver registered: sun.jdbc.odbc.JdbcOdbcDriver@6689a8
1328804166609|-1||debug||Driver manager reporting driver registered: org.postgresql.Driver@ecc0f8
1328804166609|-1||debug||Driver manager reporting driver registered: oracle.jdbc.OracleDriver@1cab16f
1328804166609|-1||debug||Driver manager reporting driver registered: com.p6spy.engine.spy.P6SpyDriver@10fdc46