hierarchical log routing is now implemented in object-remote instead of log-contextual
[scpubgit/Object-Remote.git] / lib / Object / Remote / Role / Connector / PerlInterpreter.pm
index cfa039a..536897d 100644 (file)
@@ -5,6 +5,7 @@ use IO::Handle;
 use Object::Remote::ModuleSender;
 use Object::Remote::Handle;
 use Object::Remote::Future;
+use Object::Remote::Logging qw( :log );
 use Scalar::Util qw(blessed);
 use Moo::Role;
 
@@ -29,6 +30,8 @@ around connect => sub {
   return future {
     $f->on_done(sub {
       my ($conn) = $f->get;
+      $conn->remote_sub('Object::Remote::Logging::init_node')
+         ->(Object::Remote::Logging->arg_router);
       Object::Remote::Handle->new(
         connection => $conn,
         class => 'Object::Remote::ModuleLoader',
@@ -93,6 +96,7 @@ END
   $text .= "ENDFAT\n";
   $text .= <<'END';
 eval $Object::Remote::FatNode::DATA;
+die $@ if $@;
 END
   $text .= "__END__\n";
   return $text;