I humbly ask the great monks for help with a perl problem that is driving me crazy. I am writting a program on windows and I need a logging facility. I decided to use log::log4perl, wich I have used in the pass on *nx systems and it works wonderful.

But for some reason, I cannot get it do nothing on windows. I am using an external config file (logger.conf) part of it is shown below (this is the INFO facility config but all others are in the same format:

log4perl.logger=INFO, INFOLOGFILE log4perl.appender.INFOLOGFILE=Log::Log4perl::Appender::File log4perl.appender.INFOLOGFILE.filename=x:\\Code\\jas\\logger\\addenabl +e\info.log log4perl.appender.INFOLOGFILE.mode=append log4perl.appender.INFOLOGFILE.layout=PatternLayout log4perl.appender.INFOLOGFILE.layout.ConversionPattern=[%r]%F %L %c - +%m%n
and here is a snippet of code forcing an INFO message:
use Log::Log4perl qw(get_logger); Log::Log4perl->init('logger.conf'); $exitcode = 1; my $logger = get_logger(); if ($exitcode == 1){ $logger->info("Something went right"); }
Am I just not seeing something? Any advice or suggestions would be greatly appreciated. ~crypix

In reply to log::log4perl on win32 not logging by crypix

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.