On Aug 2, 2005, at 9:11 AM, Iwan Tomlow wrote:
However, some of my appenders (namely RollingFileAppender and
DailyRollingFileAppender) no longer work.
The first still creates a logfile but doesn't role, the second does
nothing
and debug log shows:
"log4cxx: No output stream or file set for the appender named [D]."
I'm surprised that DailyRollingFileAppender isn't working. Classic
RFA not working wasn't a surprise. log4j's CVS HEAD has both
org.apache.log4j.RollingFileAppender (for compatibility with log4j
1.2) and org.apache.log4j.rolling.RollingFileAppender (new and
improved generic rolling framework), however the log4cxx class
factory didn't anticipate multiple classes with the same name so it
currently can only support one of the RFA's at a time).
Should I change the appender definitions in the properties file? I
can't
find any documentation or FAQs that mention a change in
the .properties
layout, allthough the sources for RollingFileAppender have changed
greatly
and seem to have replaced the 'MaxFileSize' and 'MaxBackupIndex'
with the
new 'RollingPolicy' objects.
Are there any examples of a .properties file for a working
RollingFileAppender with the current CVS-head?
The property files are attempting to remain compatible with log4j CVS
HEAD. In this case, I'd point you to the log4j documentation for the
new RFA but its hasn't been done. The unit tests contain a couple of
examples that configure RFA's but they do so using the API, not
configuration files. The log4j unit tests have a few configuration
files for RFA's, see logging-log4j/tests/input/rolling/filter1.xml
and time1.xml for examples. I'll see if I can port the corresponding
tests over the log4cxx shortly.