8 Jul 11:12
RE: Replace a file in DailyRollingFileAppender
From: Aggarwal, Rajat <rajat.aggarwal <at> razorsight.com>
Subject: RE: Replace a file in DailyRollingFileAppender
Newsgroups: gmane.comp.jakarta.log4j.user
Date: 2008-07-08 09:12:39 GMT
Subject: RE: Replace a file in DailyRollingFileAppender
Newsgroups: gmane.comp.jakarta.log4j.user
Date: 2008-07-08 09:12:39 GMT
Hi Thorbjørn Actually, I have a created a logger instance and am adding an appender to it through my java code. So, I am not sure if I still need to make configuration entries in log4j.properties file. If you want, I can also send across the piece of code I have written for thee same. Thanks and Regards, Rajat Aggarwal -----Original Message----- From: Thorbjørn Ravn Andersen [mailto:thunderaxiom <at> gmail.com] Sent: Tuesday, July 08, 2008 1:22 PM To: Log4J Users List Subject: Re: Replace a file in DailyRollingFileAppender Aggarwal, Rajat skrev den 08-07-2008 07:44: > Hi All, > > > > Is there any way we can replace a file attached to a particular appender > using java code? I am using DailyRollingFileAppender for my purpose and > want to log to separate files depending upon certain configurations made > in the database. Can we dynamically change the files an appender is > writing to? If so, how? Have you tried creating a new configuration for that particular appender and programatically telling log4j to load that configuration? -- Thorbjørn --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe <at> logging.apache.org For additional commands, e-mail: log4j-user-help <at> logging.apache.org
RSS Feed