cancel
Showing results for 
Search instead for 
Did you mean: 

How to use log4j with an AMP

lvs
Champ in-the-making
Champ in-the-making
Hi,

I want to developp extension for my Alfresco instance and to package them into an AMP. I am trying to use log4j into my AMP for the classes of my new package, so I created a log4j.properties and put it at the root of my jar file, but it does not seem to be found by log4j.
Do you know if I am doing something wrong? Perhaps I should put the log4j.properties in another place?
Changing the log4j.properties directly in the ALfresco.war is not a good alternative for me because we are trying to developp all extensions using AMP.

Thanks for your help!!
Laura
3 REPLIES 3

lvs
Champ in-the-making
Champ in-the-making
This is my log4j file

log4j.rootLogger=debug, Console

###### Console appender definition #######

# All outputs currently set to be a ConsoleAppender.
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{3}] %m%n

an dI also tried with this one :

log4j.logger.org.aalfresco.module.mymodule=debug

Thanks for your help!
Laura

janv
Employee
Employee
This will be possible with 2.2 (post BETA). Refer to:

http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#log4j.properties

Regards,
Jan

lvs
Champ in-the-making
Champ in-the-making
Thank you janv for your reply!
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.