[xwiki-dev] Why is log4j.properties included in xwiki.jar ?

Vincent Massol vincent at massol.net
Mon Mar 5 18:19:06 CET 2007


Hi Xavier,

On Mar 5, 2007, at 6:10 PM, Xavier MOGHRABI wrote:

> Dear XWiki developers,
>
> I'm configuring XWiki 1.0b4 to run on top of JOnAS 4.8.4 to use it  
> for the
> future website of the OW2 Consortium.
>
> When I start XWiki (on JOnAS), a file xwiki.log is created in the  
> current
> directory.
>
> First at all, I was suspecting a configuration problem in the  
> webapp. So I've
> discovered that the log xwiki.log is configured in the file  
> log4j.properties
> included within xwiki.jar. This is not really handy to configure  
> XWiki log
> directory.

I agree we shouldn't have it in the JAR. It should be in the WAR.

That said you don't have to edit it. See http://www.xwiki.org/xwiki/ 
bin/view/Community/Debugging#HLogging

>
> I think it should be better if that file would be directly in WEB- 
> INF/ at the
> same level of xwiki.log.

I'd rather put it in WEB-INF/classes as it'll be in the classpath and  
can be found by log4j automatically. Actually I'd personally prefer  
to have all configuration files located there instead of WEB-INF as  
this will make them available using CP mechanism but that's a  
personal preference. For log4j.properties it makes sense to have it  
WEB-INF/classes though even if we don't move the other config files.

Please file a JIRA issues and possibly attach a patch :)

Thanks
-Vincent

> Unless if there is a way to configure the log
> directory in xwiki.cfg, isn't there ?
>
> Cheers




More information about the devs mailing list