[Yanel-dev] Make WAR files deployable without reconfiguration

Guillaume Déflache guillaume.deflache at wyona.com
Tue May 25 10:33:35 CEST 2010


Michael Wechner schrieb:
> Hi

Hi!


> In order to make Yanel WAR files deployable without reconfiguration I 
> would like to use ${catalina.base} within the log4j config:
> 
> conf/log4j.properties
> 
> which means the log files would be located at
> 
> YANEL_HOME/local/apache-tomcat-5.5.20/logs/
> 
> (if the default Tomcat is used)
> 
> instead
> 
> YANEL_HOME/logs
> 
> WDYT?

The trick will already help, thanks!

If it stays documented as commented code in the default 
conf/log4j.properties I do not see a need to make that the default as it 
makes the files more complicated to find for the developer, and for 
deployment you always have to take a look at this file and override it 
anyway if only to lower the logging level from DEBUG to WARN.

Also some time ago I remember implementing a class to tell Log4J to look 
for its configuration elsewhere than in WEB-INF/classes/ for deployment, 
I will try to dig that out. (Well, it wasn't rocket science, it is 
probably explained somewhere in Log4J's docs).

HTH,
    Guillaume


More information about the Yanel-development mailing list