[svk-commit] r2425 - branches/svk-logger/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Sun Jul 8 21:15:10 EDT 2007
Author: clsung
Date: Sun Jul 8 21:15:08 2007
New Revision: 2425
Modified:
branches/svk-logger/lib/SVK/Logger.pm
Log:
- use SVKLOGCONFFILE env variable to specify the logger's configuration
- testing
Modified: branches/svk-logger/lib/SVK/Logger.pm
==============================================================================
--- branches/svk-logger/lib/SVK/Logger.pm (original)
+++ branches/svk-logger/lib/SVK/Logger.pm Sun Jul 8 21:15:08 2007
@@ -62,7 +62,17 @@
my $level = { map { $_ => uc $_ } qw( debug info warn error fatal ) }
->{ lc $ENV{SVKLOGLEVEL} } || 'INFO';
- my $conf = qq{
+ my $conf_file = $ENV{SVKLOGCONFFILE};
+ my $conf;
+ if ( -e $conf_file ) {
+ my $FH;
+ open ($FH, $conf_file) or die $!;
+ local $/;
+ $conf = <$FH>;
+ close $FH;
+ }
+ #warn $conf unless $Log::Log4perl::Logger::INITIALIZED;
+ $conf ||= qq{
log4perl.rootLogger=$level, Screen
log4perl.appender.Screen = Log::Log4perl::Appender::Screen
log4perl.appender.Screen.stderr = 0
More information about the svk-commit
mailing list