On Jun 28, 2006, at 5:26 PM, john ware wrote:
Hi,
I built a copy of log4cxx-0.9.8 on windows and now my app won't
write to the log file. It was working fine using the previous version.
There is a message sent to the console "log4cxx: No output
stream or file set for the appender named [FILE].".
The "EventLog" appender works just fine so I figure it is a
config issue. My config file is below.
If someone can point out what needs to be changed, I would be
most appreciative.
thanks
john
log4j 1.3 has two distinct classes named RollingFileAppender, one in
org.apache.log4j and a new architecture one in
org.apache.log4j.rolling. The log4cxx RFA is based on the new
o.a.l.rolling.RFA and uses its configuration syntax (which would
contain elements for triggeringPolicy and rollingPolicy). It is on
the to-do list to support both the old-style and new-style
configuration, however at the current time the log4cxx class file
mapping does not make any distinction based on the package name, it
only looks at the terminal class name. Here is an example of
configuration of RFA from the log4cxx unit tests:
<appender name="ROLL"
class="org.apache.log4j.rolling.RollingFileAppender">
<rollingPolicy
class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
<param name="fileNamePattern" value="output/test1-%d{yyyy-MM-
dd_HH_mm_ss}"/>
</rollingPolicy>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%c{1} - %m%n"/>
</layout>
</appender>