Menu

'Uninitialized value' warnings using Log4Perm

Help
2009-08-13
2013-06-04
  • Johannes Kilian

    Johannes Kilian - 2009-08-13

    I've got the following problem (ActiveStatePerl 5.8.8, Log::Log4perl 1.24)

    * Running the following simple program:
    ---
    use strict;
    use warnings;

    use Log::Log4perl;
    Log::Log4perl::init('logtest_l4pconfig.xml');
    my $logger = Log::Log4perl->get_logger();

    $logger->fatal("Fatal");
    $logger->error("Error");
    $logger->warn("Warning");
    $logger->info("Info");
    $logger->debug("Debug");
    ----

    with the following configuration:
    ---
    <?xml version="1.0" encoding="utf-8"?>
    <log4perl:configuration xmlns:log4perl="http://log4perl.sourceforge.net/" threshold="debug" oneMessagePerAppender="true">
      <appender name="AppGeneralScreen" class="Log::Log4perl::Appender::Screen">
        <filter-ref id="FilterRange" />
        <layout class="Log::Log4perl::Layout::SimpleLayout"/>
      </appender>
      <filter name="FilterRange" class="Log::Log4perl::Filter::LevelRange">
        <param name="LevelMin" value="INFO" />
        <param name="LevelMax" value="FATAL" />
        <param name="AcceptOnMatch" value="true" />
      </filter>
      <root>
        <priority value="WARN" />
        <appender-ref ref="AppGeneralScreen" />
      </root>
    </log4perl:configuration>
    ---

    This gives me the following output:
    ---
    Use of uninitialized value in hash element at C:/Programme/Perl/site/lib/Log/Log4perl/Config.pm line 452.
    Use of uninitialized value in numeric gt (>) at C:/Programme/Perl/site/lib/Log/Log4perl/Config.pm line 452.
    FATAL - Fatal
    ERROR - Error
    WARN - Warning
    ---

    Where do the warnings come from? I'm cannot figure out why this is happening....

    Any help welcome!

    Thanks in advance
    Johannes

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.