You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Thomas Chang <th...@yahoo.de> on 2007/02/07 18:16:17 UTC

A question about log4j

Hi all,
   
  I am not sure if my question is put in a right place. Hope there is someone who can give me some info.

I have a file called "mylog.log4j.properties" - not "log4j.properties". Normally I should put this file under WEB-INF and it will be packaged in to the WAR. But I want to put this logfile outside of the WAR so it will be easy to change its contents without open the WAR.

But I don't know where should I put this logfile so my web-application will write the logs into it. I've heard I have to configue the classpath, or I have to configure the web.xml. But how?



 		
---------------------------------
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das  neue Yahoo! Mail .

Re: A question about log4j

Posted by Mike Kienenberger <mk...@gmail.com>.
I think how you add a file external from your war file to your
container classpath depends on your container.  You'll have to check
your container documentation.

On 2/7/07, Thomas Chang <th...@yahoo.de> wrote:
> Hi all,
>
> I am not sure if my question is put in a right place. Hope there is someone
> who can give me some info.
>
> I have a file called "mylog.log4j.properties" - not "log4j.properties".
> Normally I should put this file under WEB-INF and it will be packaged in to
> the WAR. But I want to put this logfile outside of the WAR so it will be
> easy to change its contents without open the WAR.
>
> But I don't know where should I put this logfile so my web-application will
> write the logs into it. I've heard I have to configue the classpath, or I
> have to configure the web.xml. But how?
>
>
>
>  ________________________________
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr
> bietet das neue Yahoo! Mail .
>
>

Re: A question about log4j

Posted by Don Hill <ju...@gmail.com>.
Thomas,

If you just want to change logging levels then I have attached a jsp that
will allow this, I think there is a property that you can pass in like -
Dlog4j.config=/path/to/file or something like that.

Don

On 2/7/07, Thomas Chang <th...@yahoo.de> wrote:
>
> Hi all,
>
> I am not sure if my question is put in a right place. Hope there is
> someone who can give me some info.
>
> I have a file called "mylog.log4j.properties" - not "log4j.properties".
> Normally I should put this file under WEB-INF and it will be packaged in to
> the WAR. But I want to put this logfile outside of the WAR so it will be
> easy to change its contents without open the WAR.
>
> But I don't know where should I put this logfile so my web-application
> will write the logs into it. I've heard I have to configue the classpath, or
> I have to configure the web.xml. But how?
>
> ------------------------------
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel
> mehr bietet das neue Yahoo! Mail
> <http://de.rd.yahoo.com/evt=40589/*http://de.docs.yahoo.com/ymail/landing.html+%0A>
> .
>
>