From: Tyler Riddle Date: Fri, 11 Jan 2013 20:30:01 +0000 (-0600) Subject: pass exporter to router log requests X-Git-Tag: v0.005000_01~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e8aa64e4ebdc5c765d69fb0f447946fdfef8df7;p=p5sagit%2FLog-Contextual.git pass exporter to router log requests --- diff --git a/lib/Log/Contextual.pm b/lib/Log/Contextual.pm index a491691..57c2ce7 100644 --- a/lib/Log/Contextual.pm +++ b/lib/Log/Contextual.pm @@ -81,6 +81,7 @@ sub before_import { $spec->add_export("&log_$level", sub (&@) { my ($code, @args) = @_; $router->handle_log_request({ + controller => $class, package => scalar(caller), caller_level => 1, level => $level, @@ -90,6 +91,7 @@ sub before_import { $spec->add_export("&logS_$level", sub (&@) { my ($code, @args) = @_; $router->handle_log_request({ + controller => $class, package => scalar(caller), caller_level => 1, level => $level, @@ -105,6 +107,7 @@ sub before_import { &$code; }; $router->handle_log_request({ + controller => $class, package => scalar(caller), caller_level => 1, level => $level, @@ -118,6 +121,7 @@ sub before_import { &$code; }; $router->handle_log_request({ + controller => $class, package => scalar(caller), caller_level => 1, level => $level,