From: Andrew <an...@gu...> - 2008-08-19 21:47:42
|
As I understand it, calling the following: Log::Log4perl->easy_init({ level => $DEBUG }, { level => $INFO, file => ">> log.log" }); should create two loggers, the first logging DEBUG and up messages to stderr and the second logging INFO and up to a file called log.log. While this does create two loggers, one logging to stderr and one to a file, both loggers get whatever level is set last, no matter how I arrange this list of hashes. Any idea what's going on here? I'm using Log4perl 1.17. Here's a simple script showing this behavior: #! /usr/bin/perl use strict; use warnings; use Log::Log4perl qw(:easy); Log::Log4perl->easy_init({ level => $DEBUG }, { level => $INFO, file => ">> log.log" }); my $log = Log::Log4perl::get_logger(); $log->debug("debug line"); $log->info("info line"); |