Hi Andy,
I just found this rolling file appender issue in a code drop from a
few weeks ago and have a workaround that seems to work well.
>From the code I have, it appears that the Rolling File Appender is being
converted/updated currently. You might have noticed that there is an
obsoleterollingfileappender.cpp file that has, among other things, the
code for setMaxFileSize, setMaximumFileSize and activateOptions.
The first two are the expected methods to set the RollingFileAppender
internal variables but neither one updates the internal triggering
object that actually handles the rolling behavior. That code currently
is in activateOptions and if you look at the constructor it is expected
that somehow that method should be called after setting or changing the
options.
The workaround then is to manually call activateOptions after setting
your options. For example:
log4cxx::RollingFileAppender * rollingfileappender = new
log4cxx::RollingFileAppender( layout, filename, append);
// Set your options and then...
log4cxx::helpers::Pool pool;
rollingfileappender->activateOptions(pool);
I've been using this workaround fairly heavily in a test environment for
a few weeks on Windows and AIX 5 and so far haven't suffered any ill
effects and it works as one would expect it to.
I hope this helps,
James
-----Original Message-----
From: log4cxx [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 16, 2006 12:50 PM
To: Log4CXX User
Subject: RollingFileAppenders and Property File Configuration
Over the past year I've seen a good number of emails dealing with
configuring RollingFileAppenders in 0.9.8. In general these refer to XML
configuration. I've seen at least one email saying that switching from a
property file to an XML file allowed someone to get it working, where
before it was not.
Currently all my applications (and users) use property files. Is there
anyone out there who has RollingFileAppenders working with 0.9.8 and
property files?
I can get them to log to a file, but it will never roll.
Thanks,
Andy