logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James A. N. Stauffer" <stauffer.ja...@gmail.com>
Subject Re: Problem with Location of the log file
Date Fri, 17 Aug 2007 01:47:10 GMT
If you use an XML config file then it can refer to system properties.  Example:
    <param name="File"
value="'${catalina.base}/logs/'MMM-dd-EEE'/'HH-mm-ss-S'.log'" />

I don't know if something similar exists for properties files.

On 8/16/07, Rajpurkar, Amit {PI} <amit.rajpurkar@pepsico.com.au> wrote:
> Hi,
>
> I have just started to user Log4j.
> The logging is working good. I have one problem -- I want to make the
> output log file location portable, rather than dependent on each
> machine.
>
> In the configuration file I have
> log4j.appender.R.File=D:/Documents and
> Settings/ARajpur/.netbeans/5.5.1/apache-tomcat-5.5.17_base/logs/applicat
> ionLogs_VFM.log
>
> When ever I deploy my applocation to test server, I need to modify it to
> log4j.appender.R.File=E:/java/Tomcat 5.0/logs/applicationLogs_VFM.log
>
> Is there any way in which I don't have to hard code the file path on
> different machines??
>
>
> Thanks and Regards,
> -Amit
>
>
> THIS ELECTRONIC MAIL MESSAGE AND ITS CONTENTS ARE INTENDED ONLY FOR THE USE OF THE ADDRESSED
RECIPIENT(S) AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW. IF YOU ARE NOT AN INTENDED RECIPIENT, OR THE AGENT RESPONSIBLE
FOR DELIVERING THIS EMAIL TO THE INTENDED RECIPIENT(S), YOU ARE HEREBY NOTIFIED THAT ANY USE,
DISSEMINATION, DISTRIBUTION, OR COPYING OF THIS COMMUNICATION IS STRICTLY PROHIBITED AND MAY
BE UNLAWFUL. IF YOU RECEIVED THIS EMAIL IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY
REPLYING TO THIS EMAIL OR BY TELEPHONE, AND DELETE THE EMAIL SENT IN ERROR
>


-- 
James A. N. Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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


Mime
View raw message