You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Gopal Patwa <go...@gmail.com> on 2008/07/03 08:43:00 UTC

Re: Persist dynamic configuration changes to log4j.xml file

Hi,

I was looking for this option too, changing log level with JMX, is it
possible to share your log4j JMX config or if you know any doc can you
share.

Thanks for Help
Gopal


bjacobt wrote:
> 
> Hello,
> I'm using Log4j 1.2.15 along with Log4j extras companion. We use the
> extras because I want to use RollingFileAppender and then compress the
> file once it is rolled over.
> 
> I also need to provide an interface to dynamically change log
> configuration, (MaxFileSize, Number Of rolled over files (MaxIndex), and
> Log Level). I have a JMX MBean registered and I'm able to change
> configuration at runtime.
> 
> Now my next step is to persist the changes made through JMX to the
> log4j.xml configuration file. Is there a utility already written for this
> purpose? Or does anyone have an easy way to achieve this.
> 
> Thank you,
> Jacob.
> 
> 

-- 
View this message in context: http://www.nabble.com/Persist-dynamic-configuration-changes-to-log4j.xml-file-tp17799896p18252684.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


MaxBackupIndex in DailyRollingFileAppender

Posted by Michael Sukianto <mi...@sigma.co.id>.
Hi,

When using a DailyRollingFileAppender, is there any way to specify the 
maximum number of files which should be kept? I know that the 
RollingFileAppender supports a maxBackupIndex property, but it seems 
this is not supported by DailyRollingFileAppender. I don't want to use 
RollingFileAppender because I want the files to rollover every day, 
rather than when they reach a certain size. So my requirements are:

- Roll files over daily
- Only keep the last 5 log files

Any Solution?

Regards,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org