The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Log::Log4perl::Config::DOMConfigurator - reads xml

SYNOPSIS

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

    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    <appender name="FileAppndr1" class="org.apache.log4j.FileAppender">
        <layout class="Log::Log4perl::Layout::PatternLayout">
                <param name="ConversionPattern"
                       value="%d %4r [%t] %-5p %c %t - %m%n"/>
        </layout>
        <param name="File" value="t/tmp/DOMtest"/>
        <param name="Append" value="false"/>
    </appender>

    <category name="a.b.c.d" additivity="false">
        <level value="warn"/>  <!-- note lowercase! -->
        <appender-ref ref="FileAppndr1"/>
    </category>

   <root>
        <priority value="warn"/>
        <appender-ref ref="FileAppndr1"/>
   </root>

   </log4j:configuration>

DESCRIPTION

This parses an XML file that conforms to the log4j.dtd, q.v. It currently does not handle any of the log4perl extensions we've been coming up with, but that should hopefully follow shortly.

You use it just like you would a properties config but if the data starts with an xml declaration <\?xml ... then it gets parsed by this DOMConfigurator instead of the PropertiesConfigurator.

Note that you need XML::DOM installed.

The code is brazenly modeled on log4j's DOMConfigurator class, (by Christopher Taylor, Ceki Gülcü and Anders Kristensen) and any perceived similarity is not coincidental.

CAVEAT

It is still (version 0.02 Jan-2002) very fresh, alpha software, please check it out thoroughly before use and let me know if you find any problems.

SEE ALSO

t/038XML-DOM1.t for examples

Log::Log4perl::Config

Log::Log4perl::Config::PropertyConfigurator

Log::Log4perl::Config::LDAPConfigurator (coming soon!)

AUTHOR

Kevin Goess, <cpan@goess.org> Jan-2003

1 POD Error

The following errors were encountered while parsing the POD:

Around line 306:

Non-ASCII character seen before =encoding in 'Gülcü'. Assuming CP1252