Hi Simon,
   
  thanks for the answer.
   
  And sorry, I will put my question by the mailinglist by logger.
   
  Regards
   
  Thomas
   
   
  ****************
   
  Hi Thomas,

On Sat, 2008-01-26 at 09:12 +0100, Thomas Chang wrote:
>   1.
>   Where should I save the "log4j.properties"? I think it should be
 under /webapp//WEB-INF?


This is really the wrong mailing list. See:
  http://logging.apache.org

However the answer is that the file needs to be in the *classpath*. The
WEB-INF directory of a webapp is not in the classpath.

The directory WEB-INF/classes is in the classpath.

>    
>   2.
>   How can the program find this file (I mean how to write in the
 java)?

Do you mean you want to dynamically create a configuration file at
runtime? Don't do that, it is a bad idea.

In most cases, there is no reason to set the logging configuration from
your program; just use a normal configuration file. That allows someone
to modify the configuration after installing the webapp.

However if you really must configure log4j from your code, then use the
log4j api to do this instead of writing a configuration file.

Please send all further questions to the log4j email list, NOT to this
list.

Regards,
Simon



       
---------------------------------
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie“s mit 
dem  neuen Yahoo! Mail. 

Reply via email to