[open-ils-commits] r14766 - in trunk/Open-ILS/src/perlmods/OpenILS/Application: . Trigger (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Nov 4 12:03:08 EST 2009


Author: erickson
Date: 2009-11-04 12:03:05 -0500 (Wed, 04 Nov 2009)
New Revision: 14766

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm
Log:
add detail to some error logs.  add a few info logs to help detect where we are in the process

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-11-04 16:23:38 UTC (rev 14765)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-11-04 17:03:05 UTC (rev 14766)
@@ -2,7 +2,7 @@
 use strict; use warnings;
 use OpenSRF::EX qw/:try/;
 
-use OpenSRF::Utils::Logger qw/:logger/;
+use OpenSRF::Utils::Logger qw/$logger/;
 
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Utils::CStoreEditor q/:funcs/;
@@ -113,7 +113,7 @@
                 $self->cleanedup(1);
             }
         } otherwise {
-            $log->error( shift() );
+            $log->error("Event cleanup failed with ". shift() );
             $self->update_state( 'error' ) || die 'Unable to update event state';
         };
 
@@ -148,7 +148,7 @@
                         ->final_result
                 );
             } otherwise {
-                $log->error( shift() );
+                $log->error("Event reacting failed with ". shift() );
                 $self->update_state( 'error' ) || die 'Unable to update event state';
             };
 
@@ -179,7 +179,7 @@
                     ->final_result
             );
         } otherwise {
-            $log->error( shift() );
+            $log->error("Event validation failed with ". shift() );
             $self->update_state( 'error' ) || die 'Unable to update event state';
         };
 

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm	2009-11-04 16:23:38 UTC (rev 14765)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm	2009-11-04 17:03:05 UTC (rev 14766)
@@ -4,7 +4,7 @@
 use base 'OpenILS::Application::Trigger::Event';
 use OpenSRF::EX qw/:try/;
 
-use OpenSRF::Utils::Logger qw/:level/;
+use OpenSRF::Utils::Logger qw/$logger/;
 
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::Utils::CStoreEditor q/:funcs/;
@@ -56,7 +56,7 @@
                     ->final_result
             );
         } otherwise {
-            $log->error( shift() );
+            $log->error("Event reacting failed with ". shift() );
             $self->update_state( 'error' ) || die 'Unable to update event group state';
         };
 
@@ -90,7 +90,7 @@
         $self->{ids} = [ map { $_->id } @valid_events ];
         $self->editor->xact_commit;
     } otherwise {
-        $log->error( shift() );
+        $log->error("Event group validation failed with ". shift() );
         $self->editor->xact_rollback;
         $self->update_state( 'error' ) || die 'Unable to update event group state';
     };

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-11-04 16:23:38 UTC (rev 14765)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-11-04 17:03:05 UTC (rev 14766)
@@ -459,6 +459,7 @@
     my $e = OpenILS::Application::Trigger::Event->new($event_id);
 
     if ($e->validate->valid) {
+        $logger->info("Event is valid, reacting...");
         $e->react->cleanup;
     }
 
@@ -486,6 +487,7 @@
     my $e = OpenILS::Application::Trigger::EventGroup->new(@$events);
 
     if ($e->validate->valid) {
+        $logger->info("Event group is valid, reacting...");
         $e->react->cleanup;
     }
 



More information about the open-ils-commits mailing list