Many times we need to observe certain custom things to be logged.
To enable logger we need to change log4j.properties which is located in alfresco at following location:
Location : <alfresco_home>/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties
Let say we have packages which is starting with like com.company.projectx
then make an entry at last to log4j.properties like "log4j.logger.com.company.projectx=debug"
and inside java class do following :
To enable logger we need to change log4j.properties which is located in alfresco at following location:
Location : <alfresco_home>/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties
Let say we have packages which is starting with like com.company.projectx
then make an entry at last to log4j.properties like "log4j.logger.com.company.projectx=debug"
and inside java class do following :
public class CustomClass { private static final Log LOGGER = LogFactory.getLog(CustomClass.class); protected processNode() { LOGGER.debug(" INSIDE processNode method "); } }
No comments:
Post a Comment