On Wed, 7 Nov 2007, Robert Raisch wrote: > I'm probably missing something obvious here, but it seems > counterintuitive to me to have > use Log::Log4perl; > > my $config = '/dev/null'; > > eval { Log::Log4perl::init($config) }; > die "Log::Log4perl::init failed:$@" if $@;
This is a valid configuration, albeit a suspicious one: Log::Log4perl configuration looks suspicious: No loggers defined at Config.pm line 307. It's empty, so it does nothing :). > if ( Log::Log4perl::initialized() ) { > Log::Log4perl::get_logger() > ->logdie("hmm, log4perl thinks it's been > initialized"); > } > pass the eval() and then logdie() using an uninitialized logger. Actually, while this logger doesn't have an appender associated with it, it is a valid logger. > Wouldn't it be better to move line 113 in Config.pm > $Log::Log4perl::Logger::INITIALIZED = 1; > to the end of Log::Log4perl::Config::_init(), after L4p has been > successfully initialized? This wouldn't change anything since there's no "return" in between, right? That being said, I've found a bug in Config.pm that threw a warning message on empty configurations, fixed in 1.14. Thanks for the note ... -- Mike Mike Schilli [EMAIL PROTECTED] > > Thanks much. > > Log::Log4perl/1.13, perl 5.8.0, RHEL ES3/Taroon > Log::Log4perl/1.12, ActiveState perl 5.8.8/bin822, WinXP/SP2 > > -- > Rob Raisch, Financial Media Holdings Group, Inc. > Publishers of "Compliance Week" -- http://www.complianceweek.com/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > log4perl-devel mailing list > log4perl-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ log4perl-devel mailing list log4perl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/log4perl-devel