AnsweredAssumed Answered

configure Log4j in AMP file

Question asked by berenicestr69 on Aug 8, 2014
hello, i tried to configure a log4j in AMP file (Maven SDK 1.1) but it doesn´t logger  the message.

In a java class .org.alfresco.custom.AmpImpl.java
private static final Log logger = LogFactory.getLog(AmpImpl.class);




In src\main\amp\config\alfresco\module\{module.id references in the file module.properties)\log4j.properties






log4j.logger.org.alfresco.custom.AmpImpl=debug,moduleLog  –> this is de java class to trace
log4j.rootLogger=TRACE, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%24F:%t:%L] - %m%n
log4j.appender.moduleLog=org.apache.log4j.FileAppender
log4j.appender.moduleLog.File=/opt/alfresco-4.2.f/tomcat/logs/my_module_id.log
log4j.appender.moduleLog.layout=org.apache.log4j.PatternLayout
log4j.appender.moduleLog.layout.ConversionPattern=%d [%24F:%t:%L] - %m%n



It doesn´t appear any log o trace or file when in the class appear logger.info("log enabled");


Please any help to configure
Regards

Outcomes