tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bachler, Elisabeth \(Elisabeth\)" <ebach...@alcatel-lucent.com>
Subject RE: How to modify the log4j log filename during runtime?
Date Fri, 19 Jan 2007 12:37:32 GMT
Thank you.
Elisabeth
 

-----Original Message-----
From: Noah White [mailto:emailnbw@gmail.com] 
Sent: jueves, 18 de enero de 2007 17:53
To: Tomcat Users List
Subject: Re: How to modify the log4j log filename during runtime?

 First off this is a log4j question not a Tomcat question and should be
directed to the log4j list. You should begin by looking at the log4j
java docs. Log4j can be completely (re)configured pragmatically with its
APIs which is what you are trying to do. See
org.apache.log4j.PropertyConfigurator.

-Noah

On 1/18/07, Bachler, Elisabeth (Elisabeth) <ebachler@alcatel-lucent.com>
wrote:
>
>
> Hello,
> I have an application that uses log4j.
> In the application, I would like the user to choose the log file 
> directory and the logfile name (using fileChooser).
> Now, how can I pass this information to log4j so it uses this filename

> as logfile?
>
> For the moment, I use as default: "C:\App\log.html"
>
> Here is the log4j.properties file I am using:
> ===================
> log4j.rootLogger=debug, R
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=C:\App\log.html
> log4j.appender.R.MaxFileSize=10MB
> log4j.appender.R.MaxBackupIndex=10
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
>
> log4j.appender.R.layout.ConversionPattern=%d{dd-MM-yyyy HH:mm:ss}  
> %-5p (%C:%M:%
> L) - %m%n
> =====================
> Thanks
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message