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?" ); print "\$DEBUG = $DEBUG\n\$ERROR = $ERROR\n"; print " THE CURRENT LEVEL IS ", Log::Log4perl->get_logger->level,"\n"; __END__ 2009/10/25 13:23:40 I've got something to say! 2009/10/25 13:23:40 Hey! What's going on in there? $DEBUG = 10000 $ERROR = 40000 THE CURRENT LEVEL IS 10000