users@glassfish.java.net

Re: Where to put log4j.properties file

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 08 Jun 2006 20:47:28 -0700

Hi Ben,

ben short wrote On 06/08/06 15:02,:

> Hi,
>
> I want to use log4j but where should the log4.properties file be
> inside my ear file?


I've wrapped my log4j.properties into a JAR file (log4jProperties.jar),
and stored it in my EAR file's lib directory, along with the log4j and
commons-logging JAR files, so my EAR file's layout looks like this:

  /META-INF/application.xml
  /lib/log4j-1.2.13.jar
  /lib/commons-logging-1.1.jar
  /lib/log4jProperties.jar
  /test.war

The contents of my /META-INF/application.xml are as follows:

  <application ...>
    <module>
      <web>
        <web-uri>test.war</web-uri>
        <context-root>/test</context-root>
      </web>
    </module>
  </application>

With this, my servlet resource in test.war was able to log to log4j.

Let me know if this doesn't work for you.


Jan

>
> Ben
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>