[Bps-public-commit] r10224 - in bpsbuilder/BPB/lib: BPB BPB/Backend BPB/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Jan 2 11:44:23 EST 2008


Author: sunnavy
Date: Wed Jan  2 11:44:13 2008
New Revision: 10224

Modified:
   bpsbuilder/BPB/lib/BPB.pm
   bpsbuilder/BPB/lib/BPB/Backend/SVK.pm
   bpsbuilder/BPB/lib/BPB/Backend/SVN.pm
   bpsbuilder/BPB/lib/BPB/Build.pm
   bpsbuilder/BPB/lib/BPB/Source/Base.pm

Log:
added more powerful log support

Modified: bpsbuilder/BPB/lib/BPB.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB.pm	(original)
+++ bpsbuilder/BPB/lib/BPB.pm	Wed Jan  2 11:44:13 2008
@@ -14,6 +14,7 @@
 use BPB::Backend;
 use BPB::Source;
 use BPB::Build;
+use BPB::Logger;
 
 =head2 new
 
@@ -39,26 +40,35 @@
     );
 
     if ( $self->config->name ) {
+        BPB::Logger->new($self);
 
         $self->backend(
             BPB::Backend->new(
                 %{ $self->config->name->{backend} },
-                name => $args{name}
+                name => $args{name},
             )
         );
-        $self->source(
-            BPB::Source->new(
-                %{ $self->config->name->{source} },
-                follow => $args{follow},
-                source => $args{source},
-                name => $args{source_name},
-            )
-        ) if $args{source};
+
+        if ( $args{source} ) {
+            $self->source(
+                BPB::Source->new(
+                    %{ $self->config->name->{source} },
+                    follow => $args{follow},
+                    source => $args{source},
+                    name   => $args{source_name},
+                )
+            );
+            $self->source->log(Log::Log4perl->get_logger( ref $self->source ));
+        }
 
         $self->build( BPB::Build->new( %{ $self->config->name->{build} } ) );
-    }
 
-    return $self;
+        for my $comp (qw/backend build/) {
+            $self->$comp->log(Log::Log4perl->get_logger( ref $self->$comp ));
+        }
+
+        return $self;
+    }
 }
 
 1;

Modified: bpsbuilder/BPB/lib/BPB/Backend/SVK.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Backend/SVK.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Backend/SVK.pm	Wed Jan  2 11:44:13 2008
@@ -15,7 +15,7 @@
 our %REQUIRE_OPTIONS = ( import => [qw/source/], );
 
 use base qw/Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw/repository/);
+__PACKAGE__->mk_accessors(qw/repository log/);
 
 =head2 new
 

Modified: bpsbuilder/BPB/lib/BPB/Backend/SVN.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Backend/SVN.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Backend/SVN.pm	Wed Jan  2 11:44:13 2008
@@ -15,7 +15,7 @@
 our %REQUIRE_OPTIONS = ( import => [qw/source/], );
 
 use base qw/Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw/repository/);
+__PACKAGE__->mk_accessors(qw/repository log/);
 
 =head2 new
 

Modified: bpsbuilder/BPB/lib/BPB/Build.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Build.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Build.pm	Wed Jan  2 11:44:13 2008
@@ -6,7 +6,8 @@
 
 use base qw/Class::Accessor::Fast/;
 
-__PACKAGE__->mk_accessors(qw/install_base perl build_base skip_test commands/);
+__PACKAGE__->mk_accessors(
+    qw/install_base perl build_base skip_test commands log/);
 
 use File::Spec;
 use File::Temp qw/tempdir/;

Modified: bpsbuilder/BPB/lib/BPB/Source/Base.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Base.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/Base.pm	Wed Jan  2 11:44:13 2008
@@ -11,7 +11,7 @@
 use base qw/Class::Accessor::Fast/;
 __PACKAGE__->mk_accessors(
     qw/source directory download_directory follow min_perl_version map_path
-      skip map keep_recommends name/
+      skip map keep_recommends name log/
 );
 
 =head2 new



More information about the Bps-public-commit mailing list