pass exporter to router log requests
Tyler Riddle [Fri, 11 Jan 2013 20:30:01 +0000 (14:30 -0600)]
lib/Log/Contextual.pm

index a491691..57c2ce7 100644 (file)
@@ -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,