|
From: Mike S. <m...@pe...> - 2006-01-29 08:09:40
|
On Fri, 27 Jan 2006, Ford, Andy wrote:
> > This looks similar to something that got fixed in Log::Log4perl 1.0.
> > Are you using the latest from CPAN? Also, make sure it's not picking
> > up an old version from somewhere else, i.e.
> >
> > perl -MLog::Log4perl -le 'print $Log::Log4perl::VERSION'
> >
> > should print 1.02.
> >
>
> It's log4perl 1.02.
Looks like Carp isn't working correctly on this platform. What does
perl -MCarp -le 'print $Carp::VERSION'
print?
> Just started using log4perl about two days ago and I'm having a blast,
Great to hear :).
> #!/usr/bin/perl
> use warnings;
> use strict;
> use Log::Log4perl qw(get_logger :levels);
> my $logger = get_logger("URLbot");
> $logger->level($DEBUG);
> my $stdout_appender = Log::Log4perl::Appender->new(
> "Log::Log4perl::Appender::Screen",
> name => "screenlog",
> stderr => 0);
> $logger->add_appender($stdout_appender);
> $logger->fatal("Just checking to see if you're awake");
>
> produces the following output with my HP-UX/Perl 5.6.1 system:
>
> Odd number of elements in hash assignment at /opt/perl5//lib/site_perl/5.6.1/Log/Log4perl/Appender/Screen.pm line 27.
> Use of uninitialized value in print at /opt/perl5//lib/site_perl/5.6.1/Log/Log4perl/Appender/Screen.pm line 32.
Sorry to say, this works for me without a hitch on both perl56 and perl58
and Log4perl 1.02 on Linux and FreeBSD.
-- Mike
Mike Schilli
m...@pe...
|