[svk-commit] r2419 - branches/svk-logger/lib/SVK/Command

nobody at bestpractical.com nobody at bestpractical.com
Fri Jun 29 05:46:15 EDT 2007


Author: clsung
Date: Fri Jun 29 05:46:14 2007
New Revision: 2419

Modified:
   branches/svk-logger/lib/SVK/Command/Propget.pm

Log:
- avoid specify Log4perl-related code (since user might using Logger::Compact

Modified: branches/svk-logger/lib/SVK/Command/Propget.pm
==============================================================================
--- branches/svk-logger/lib/SVK/Command/Propget.pm	(original)
+++ branches/svk-logger/lib/SVK/Command/Propget.pm	Fri Jun 29 05:46:14 2007
@@ -81,14 +81,15 @@
             my $proplist = $self->_proplist($target);
             exists $proplist->{$pname} or return;
 
-            my $origlayout = $Log::Log4perl::Logger::APPENDER_BY_NAME{'Screen'}->layout;
-            my $verbatimlayout = Log::Log4perl::Layout::PatternLayout->new("%m");
-            $Log::Log4perl::Logger::APPENDER_BY_NAME{'Screen'}->layout($verbatimlayout);
-            $logger->info( $target->report, ' - ')
-                if !$self->{strict} && ( $self->{recursive} || @targets > 1 );
-            $logger->info( $proplist->{$pname});
-            $logger->info( "\n" )if !$self->{strict};
-            $Log::Log4perl::Logger::APPENDER_BY_NAME{'Screen'}->layout($origlayout);
+	    if ( $self->{strict} ) {
+		print $proplist->{$pname};
+	    } else { # !self->{strict}
+		if ( $self->{recursive} || @targets > 1 ) {
+		    $logger->info( $target->report, ' - ', $proplist->{$pname}, "\n" );
+		} else {
+		    $logger->info( $proplist->{$pname}, "\n" );
+		}
+	    }
         }, $errs, 0,
     ) for @targets;
 


More information about the svk-commit mailing list