On Aug 30, 2010, at 1:51 PM, Mik wrote:
>
> Thanks - already been there.
>
> Does not solve my problem :-(
>
> Basically what I'm after is to configure server logging to use log4j.xml
> instead of log4j.properties (server-log4j.properties)
>
> I did already try to define a file called log4j.xml & server-log4j.xml, both
> without any luck.
Hi Mik,
The Logger GBean configures the location of the log4j configuration file for
the Geronimo server. I don't know that anyone has ever tried it, but there is
some code which seems to accommodate a .xml file. So, if you're willing to test
it out, try the following...
Edit var/config/config.xml, locate the j2ee-system <module> and replace with
something like the following (I'm assuming 2.2, adjust your version numbers
appropriately):
<module name="org.apache.geronimo.framework/j2ee-system/2.2/car">
<gbean name="Logger">
<attribute name="configFileName">var/log/server-log4j.xml</attribute>
</gbean>
</module>
If that doesn't work, you can look at the following to see what might be going
wrong:
geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/logging/log4j/URLConfigurator.java
geronimo/server/branches/2.2/framework/configs/j2ee-system/src/main/plan/plan.xml
--kevan