logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Newbie how to place logfile under tomcat logs
Date Tue, 12 Aug 2003 15:23:10 GMT

Howdy,

>yeah, I'm using ant but I dont like the fact that it is hard-coded.

It's not hard-coded, certainly not more hard-coded than a properties
file.

> I think I'll use the properties file option, we have a properties file
>already I'll just add the log4j properties to that. I don't suppose you
>know how to load the properites file when it is in a JAR? because it
says

If the file is in a jar, use Class#getResource to get the URL to it.
Don't use the File/IO approach.  Then use
PropertyConfigurator.configure(URL configURL) instead of
configure(Properties p).

You can also consider putting the properties file outside a jar, i.e.
under WEB-INF, and using the ServletContext#getResource approach instead
of Class#getResource.  This way you can easily modify the properties
file without having to repackage your jar.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message