25831acf1fc42f372bf681d8ba93390e1746bd0f
[scpubgit/Object-Remote.git] / lib / Object / Remote / Logging.pm
1 package Object::Remote::Logging;
2
3 use strictures 1;
4
5 use Log::Contextual qw( :log );
6 use Object::Remote::LogRouter;
7
8 use base qw(Log::Contextual); 
9
10 sub arg_router { return $_[1] if defined $_[1]; our $Router_Instance ||= Object::Remote::LogRouter->new }
11
12 sub init_node { my $n = `hostname`; chomp($n); $_[0]->add_child_router("[node $n]", __PACKAGE__->arg_router) }
13
14 1;
15