logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Extra RollingFileAppender with NLOG4j
Date Fri, 05 Nov 2010 01:51:20 GMT
Comments in-line

On Nov 3, 2010, at 10:55 AM, <Kenneth.Lam@barclayscapital.com> <Kenneth.Lam@barclayscapital.com>
> At startup, I get the following errors:
> log4j:ERROR Element type "rollingPolicy" must be declared.

This also occurs with earlier versions of Apache log4j and is due to the lack of a definition
of rollingPolicy in the log4j.dtd.  The lack of a definition in the log4j.dtd results in a
failed XML validation, but noting more.  Reporting it as an error is overstating the significance
of a validation failure.

> log4j:ERROR The content of element type "appender" must match "(errorHandler?,param*,layout?,filter*,appender-ref*)"

The log4j.dtd specifies that elements in a configuration file appear in a specified order.
 log4j's DOMConfiguration isn't as picky.  This warning can be eliminated by ordering the
contents of an appender element as shown in the warning.

> .
> If I attempt to write to the appender, I then get:
> log4j:WARN Please set a rolling policy for the RollingFileAppender named 'logFileAppender'
> log4j:ERROR No output stream or file set for the appender named [logFileAppender].

This could be due either to a bad configuration file or some mismatch between NLOJ4J and the

> I think the issue is that the rollingPolicy element isn't defined in log4j.dtd

That results in an misleading warning, but would not result in a failure to configure.

> but I'm not sure how to proceed with this.  Is NLOG4J not compatible with the companion

As mentioned, NLOG4J is a fork of Apache log4j and is not supported here.  If the configuration
file works with Apache log4j, then you could try configuring with the org.apache.log4j.extras.DOMConfigurator
which may or may not work with NLOG4J.

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

View raw message