You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Iwan Tomlow <iw...@seagha.com> on 2005/08/02 16:11:01 UTC

Should properties file be changed after v0.9.7?

Hello,

I started to evaluate the log4cxx-framework some time ago, and managed to
get my application logging nicely to different kinds of appenders using a
.properties file with log4cxx-0.9.7 (with msvc 6.0).
Since 0.9.7 is marked out of date and with known bugs, I tried to grab and
build a CVS-head as recommended last week - got it working with msvc
eventually.

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]."

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?

Thanks a lot,

Iwan Tomlow

Re: Should properties file be changed after v0.9.7?

Posted by Curt Arnold <ca...@apache.org>.
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.