cancel
Showing results for 
Search instead for 
Did you mean: 

Correct extension classpath for log4j overrides?

throwback
Champ in-the-making
Champ in-the-making
Hi all,

I've been reading the documentation and searching the forums for any clear info on where I am supposed to put log4j overrides- is the logger a subsystem? The documentation truncates the location and assumes I know what the bit in the middle is!

Documentation (http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/tasks/log-levels-set.html) says:

"
When using log4j, you should:
Keep local customizations and licenses outside of the web application. For example, in the extension directory:
$TOMCAT_HOME/shared/classes/alfresco/extension/…-log4j.properties
The Alfresco supplied configuration files should be stored or installed within the web application. For example:
WEB-INF/classes/alfresco/extension/…-log4j.properties
A dev-log4j.properties file should never be used in an ongoing during production, nor packaged as a part of any product."

Unfortunately I don't know what to call the file in $TOMCAT_HOME/shared/classes/alfresco/extension/…-log4j.properties to set the log file location, so I have been forced to do this in WEB-INF, which I know is Bad Practice as I will have to re-do the overrides every time I upgrade. Can anyone shine a light? If I don't set the alfresco.log location to an absolute path the log file doesn't get written and I have to trawl catalina.out to see what's going on.

I have tried setting the logfile location in alfresco-global.properties also to no avail.

Using Alfresco 4.0.d community on Ubuntu 10.04 amd64
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
I put mine in shared/classes/alfresco/extension.

I use dev-log4j.properties.    That's just the way I've always done it.

It looks like you can use whatever file name you want e.g.

custom-log4j.properties



Here's the relevant configuration:

                <value>classpath*:alfresco/module/*/log4j.properties</value>

                <!–  Enterprise extensions  –>
                <value>classpath*:alfresco/enterprise/*-log4j.properties</value>

                <!–  Other installed extensions  –>
                <value>classpath*:alfresco/extension/*-log4j.properties</value>

                 <!–  private developer overrides –>
                <value>classpath*:alfresco/extension/dev-log4j.properties</value>

throwback
Champ in-the-making
Champ in-the-making
That's done the job beautifully - used $tomcat$/shared/classes/extension/custom-log4j.properties

You sir are a leg-end.

Kind regards,

Iain Bagnall