From: Matt S Trout Date: Tue, 20 Dec 2011 08:37:17 +0000 (+0000) Subject: actually start to add logging to Router X-Git-Tag: v0.001002~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e56859c36c8014f003db08d55f702101b98026d0;p=scpubgit%2FTak.git actually start to add logging to Router --- diff --git a/lib/Tak/Router.pm b/lib/Tak/Router.pm index 7637c1c..0aa2060 100644 --- a/lib/Tak/Router.pm +++ b/lib/Tak/Router.pm @@ -2,6 +2,7 @@ package Tak::Router; use Tak::MetaService; use Scalar::Util qw(weaken); +use Log::Contextual qw(:log); use Moo; has services => (is => 'ro', default => sub { {} }); @@ -23,7 +24,9 @@ sub start_request { sub receive { my ($self, $target, @payload) = @_; return unless $target; - return unless my $next = $self->services->{$target}; + log_debug { "Message received for ${target}" }; + return log_info { "Discarded message to ${target}" } + unless my $next = $self->services->{$target}; $next->receive(@payload); }