cancel
Showing results for 
Search instead for 
Did you mean: 

Overriding share log4j for development

gilles
Champ in-the-making
Champ in-the-making
Hi, I can't find any doc about how to override the log4j config file for share. Do I need to configure an overriding mechanism, or is it already done like in the log4JHierarchyInit bean for the alfresco app. Where can I find the precedence of the files and location in share? Tx
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

there is no log4j override mechanism for Share as there is one for Alfresco Repository. If you require this then you would need to set it up yourself. You can use the class Log4JHierarchyInit as a basis but would need to package it separately for Share, since you can't / shouldn't just drop in the alfresco-repository.jar for the one class. The precedence would then be configured with this bean.

Regards
Axel

gilles
Champ in-the-making
Champ in-the-making
Thanks Axel, that's what I guessed. But I also guess that i'm not the fisrt one?
Anybody who implemented this successfuly? TIA!

julienguay
Champ in-the-making
Champ in-the-making
I was looking for a solution and found that by trying and I/O tracing:
This can be done (I tested in 4.2.0.12, 5.1.0.5 and 5.1.1.0):
cp tomcat/webapps/alfresco/WEB-INF/classes/share/extension/log4j.properties tomcat/shared/classes/alfresco/extension/share-log4j.properties
edit share-log4j.properties for value:
log4j.appender.File.File=/logs/share.log #linux
log4j.appender.File.File=C:/logs/share.log #windows
Tks -Julien