Log4j error messages and their meanings

Ceki Gülcü
November 2004, last updated on November 18th, 2004


Message: The 'log4j.dtd' is no longer used nor needed.

Given syntactical flexiblilty that JoranConfigrator supports, it is no longer possible to express this syntatical range with a DTD. Thus, new log4j configuration files in XML should follow the general template.

Good:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration>

<log4j:configuration>
  ...
</log4j:configuration>
        

However, JoranConfigurator will continue to parse your old XML configuration files which previously required a reference to log4j.dtd. Thus, altough deprecated, the following form will continue to be parsed correctly.

Deprecated:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
        

Using the deprecated form will generate the above mentioned warning message.

Message: The FileNamePattern option must be set before using TimeBasedRollingPolicy.

The FileNamePattern option for TimeBasedRollingPolicy is mandatory.

Copyright © 1999-2004, Apache Software Foundation