Instead of changing the log file of a specified appender, you can
just (programmatically) add a new appender with the new file, and
possibly remove the old one.
...
Logger logger = Logger.getLogger( "foo.bar" );
Appender appender = new FileAppender( new PatternLayout( ... ),
"foo-bar.log", false
...I think addAppender method is accumulative...
Thomas Tuft Muller wrote:
> Instead of changing the log file of a specified appender, you can
> just (programmatically) add a new appender with the new file, and
> possibly remove the old one.
>
> ...
> Logger logger = Logger.getLogger( "foo.bar"
OTECTED]]
| Sent: 22 April 2002 13:47
| To: Log4J Users List
| Subject: Re: how to dynamically change the logfile at run time
|
|
| ...I think addAppender method is accumulative...
|
| Thomas Tuft Muller wrote:
|
| > Instead of changing the log file of a specified appender, you can
| > just (p
;C:\\apps\\logs\\file1.log");
Hope this helps
-Original Message-
From: ext Thomas Tuft Muller [mailto:[EMAIL PROTECTED]]
Sent: 22. April 2002 14:56
To: Log4J Users List
Subject: RE: how to dynamically change the logfile at run time
Yeah, that's why I suggested that you remove th
implements the triggering of it.
--
Thomas
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: 22 April 2002 14:09
| To: [EMAIL PROTECTED]
| Subject: RE: how to dynamically change the logfile at run time
|
|
| One way that i use to specify the filename
Is this suppose to work with DomConfigurator?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 9:09 AM
To: [EMAIL PROTECTED]
Subject: RE: how to dynamically change the logfile at run time
One way that i use to specify the filename
e rolling
> specific behaviour, and subclasses that implements the triggering of it.
>
> --
>
> Thomas
>
> | -Original Message-
> | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> | Sent: 22 April 2002 14:09
> | To: [EMAIL PROTECTED]
> | Subject: RE: how to dyna
gs\\file1.log");
| > |
| > | Hope this helps
| > |
| > |
| > |
| > | -Original Message-
| > | From: ext Thomas Tuft Muller [mailto:[EMAIL PROTECTED]]
| > | Sent: 22. April 2002 14:56
| > | To: Log4J Users List
| > | Subject: RE: how to dynamically change the logfi