Powered By Blogger

Friday, December 30, 2011

Logging webscripts in alfresco

Logging API

A root level object 'logger' is provided that provides functions to aid debugging of scripts.

boolean isLoggingEnabled()
Return true if console logging is enabled. To enable console logging the Log4J category of log4j.logger.org.alfresco.repo.jscript should be set to DEBUG. This can be applied in the log4j.properties file (Tomcat) or log4j.xml file (JBoss) on the Alfresco server.
void log(string)
Log a string message to the console.



  1. vi /tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties
  2. log4j.logger.org.alfresco.repo.jscript=debug

No comments:

Post a Comment