sql query debug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2016 04:30 PM
I tried adding the following to Alfresco log4j.properties:
log4j.logger.com.ibatis=DEBUG
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
log4j.logger.java.sql=DEBUG
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
log4j.logger.java.sql.ResultSet=DEBUG
# Hibernate logging options (INFO only shows startup messages)
log4j.logger.org.hibernate=INFO
# Log JDBC bind parameter runtime arguments
log4j.logger.org.hibernate.type=trace
log4j.logger.org.hibernate.SQL=debug
It does print the startup queries but that is it.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 04:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2016 05:20 PM
however I get no log.
I am using:
Alfresco 5.0.2 enterprise
p6spy.jar (v2.2.0)
sqljdbc42.jar
### spy.properties in tomcat/shared/classes:
module.log=com.p6spy.engine.logging.P6LogFactory
realdriver=com.microsoft.sqlserver.jdbc.SQLServerDriver
autoflush=true
excludecategories=
appender=com.p6spy.engine.logging.appender.FileLogger
logfile=D:\Alfresco\tomcat\logs\logsspy.log
deregisterdrivers=true
### alfresco-global.properties
#db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.driver=com.p6spy.engine.spy.P6SpyDriver
Alfresco starts up fine…
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2016 05:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 12:07 PM
The following is the most up to date blog post on the topic that I know about:
https://www.ziaconsulting.com/developer-help/setting-p6spy-alfresco/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2018 11:25 AM
I needed to modify both db.driver and db.url to get P6 log:
### database connection properties ###
#db.driver=org.postgresql.Driver
db.driver=com.p6spy.engine.spy.P6SpyDriver
db.username=alfresco
db.password=*****
db.name=alfresco
#db.url=jdbcostgresql://localhost:5432/${db.name}
db.url=jdbc6spy
ostgresql://localhost:5432/${db.name}
