Greetings, fellow monks.

I am using Log4perl 1.20 in my project and it worked fine, but then I updated to version 1.24 a couple of days ago and now nothing is logged anymore.

I looked in the changelog and googled/super-searched a bit, but I found nothing that seems to imply a major change in the way Log4perl works. Maybe one of you is experiencing similar problems and can help me understand what I can do to make my program work again. I could probably switch back to version 1.20 but that doesn't seem like the optimal solution.

Here is a reduced test case which worked fine with Log4perl 1.20 but doesn't output anything with Log4perl 1.24.

use strict; use warnings; use Log::Log4perl; # Define a logger my $log = Log::Log4perl->get_logger("abc.def.ghi"); # Define a logger layout my $layout = Log::Log4perl::Layout::PatternLayout->new("%d > %m %n"); # define appender for console output my $appender_screen = Log::Log4perl::Appender->new("Log::Log4perl::App +ender::Screen",name => 'console'); # Set the appender's layout and add it $appender_screen->layout($layout); $log->add_appender($appender_screen); $log->info("This is an info message"); $log->error("This is an error message");

In reply to Log4perl stops logging after update to 1.24 by kreetrapper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.