The following is a copy/paste example from the book Mastering Perl.
#!/usr/bin/perl
# log4perl-easy3.pl
use strict;
use warnings;
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init(
{
file => ">> error_log",
level => $ERROR,
},
{
file => "STDERR",
level => $DEBUG,
}
);
ERROR( "I've got something to say!" );
DEBUG( "Hey! What's going on in there?" );
The code should print the ERROR message in the error_log file and both messages on the screen.
What it does is that it print both message on the screen and the error_log file!
What am I missing here?
By the way I am using Strawberry Perl on windows XP, in case this is a platform bug!