Log::Log4perl->init("/opt/etc/log4perl.conf"); my $log = Log::Log4perl->get_logger("database"); ... $log->debug("blah blah");