Comments in-line

On Nov 3, 2010, at 10:55 AM, <kenneth....@barclayscapital.com> 
<kenneth....@barclayscapital.com> wrote:
> 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 appender.

> 
> 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 jar?
> 

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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to