Thank you.
Elisabeth
 

-----Original Message-----
From: Noah White [mailto:[EMAIL PROTECTED] 
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) <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to