added additional error logging
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Oct 2008 02:13:37 +0000 (02:13 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Oct 2008 02:13:37 +0000 (02:13 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10740 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/Vandelay.pm

index a65162c..8c7d585 100644 (file)
@@ -57,7 +57,10 @@ sub spool_marc {
 
        my $auth = $cgi->param('ses') || $cgi->cookie('ses');
 
-       return Apache2::Const::FORBIDDEN unless verify_login($auth);
+       unless(verify_login($auth)) {
+        $logger->error("authentication failed on vandelay record import");
+           return Apache2::Const::FORBIDDEN;
+    }
 
     my $data_fingerprint = '';
        my $purpose = $cgi->param('purpose');
@@ -87,6 +90,7 @@ sub spool_marc {
             if($total_bytes >= $MAX_FILE_SIZE) {
                 close(OUTFILE);
                 unlink $outfile;
+                $logger->error("import exceeded upload size: $MAX_FILE_SIZE");
                    return Apache2::Const::FORBIDDEN;
             }
             print OUTFILE $buf;
@@ -100,6 +104,7 @@ sub spool_marc {
            );
     }
 
+    $logger->info("uploaded MARC batch with key $data_fingerprint");
     $r->content_type('text/plain; charset=utf-8');
        print "$data_fingerprint";
        return Apache2::Const::OK;