How to get logs for Alfresco querys

For getting more information about Alfresco querys just edit (extend) custom-log4j.properties in extension directory, for example:
 
/opt/alfresco/tomcat/shared/classes/alfresco/extension/custom-log4j.properties
 
SQL queries:
 
  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
 
Be careful, this is pretty verbose. Be careful with caches too!.
 
SOLR queries:
 
  log4j.logger.org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient=DEBUG
  log4j.logger.org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage=DEBUG
 
Javascript API queries:
 
  log4j.logger.org.alfresco.repo.jscript.ScriptLogger=DEBUG
  log4j.logger.org.alfresco.repo.jscript.Search=DEBUG
 
In Alfresco Enterprise, you have more options for doing this without restarting the service:
although not all classes are enabled via JMX or support tools, for example the SQL and DbOrIndexSwitchingQueryLanguage loggers. Tested in Alfresco 4.2.4 EE.
 
Links:
00

More Blog Entries

0 Comments