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


Reply via email to