cancel
Showing results for 
Search instead for 
Did you mean: 

Log4j.properties for Share on separate Tomcat

dynabix
Champ in-the-making
Champ in-the-making
Hi

I am using Share on a separate Tomcat and want to adapt the location of the log-file for Share. For the Alfresco app itself I managed to do this by creating shared/classes/alfresco/extension/alfresco-log4j.properties under the Alfresco Tomcat directory and set te logfile location in there.

I tried something similar for Share under the Share Tomcat directory, but this has no effect.

How can I adapt the location of the log-file for Share on a separate Tomcat?

Best regards,
David
5 REPLIES 5

kavilash23
Champ on-the-rise
Champ on-the-rise
Hello,

Try to change the default share log4j.properties located at $TOMCAT-HOME/webapps/share/WEB-INF/classes/log4j.properties)

dynabix
Champ in-the-making
Champ in-the-making
Hello Kavi

Thanks for the suggestion, but this file will be overwritten when the share.war is changed or redeployed. The same will happen in the Alfresco webapp with the file "$ALFRESCO-TOMCAT-HOME/webapps/alfresco/WEB-INF/classes/log4j.properties". Therefore Alfresco made it possible to define a separate custom log4j-file "$ALFRESCO-TOMCAT-HOME/shared/classes/alfresco/extension/alfresco-log4j.properties". However creating a similar file "$SHARE-TOMCAT-HOME/shared/classes/share/extension/share-log4j.properties" does not do the trick for Share.

santoshbaradwaj
Champ in-the-making
Champ in-the-making

I found this post which explains that what I want is not possible:
http://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/overriding-share-l...

I guess that still is the case.

Thanks for the reactions anyway.

Regards,
David

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