Author: danielsh
Date: Mon Jan 30 15:36:34 2012
New Revision: 1237720

URL: http://svn.apache.org/viewvc?rev=1237720&view=rev
Log:
Log some errorsĀ instead of ignoring them.

* subversion/mod_dav_svn/liveprops.c
  (insert_prop_internal):
    Log an APLOG_ERROR-level error whenever ###error### is dumped into the
    data stream in lieu of an actual value.
  
The log entries look like this:
[Mon Jan 30 17:26:11 2012] [error] [client ::1] (160017)APR does not understand 
this error code: Can't get fetch or compute md5 checksum of '/A': traced call
where #160017 is the svn_error_t.apr_err code (for which-error.py)

The 'traced call' is due to the direct use of serr->message.  It's used this
way throughout mod_dav_svn, so I'm following suit in this commit.

Modified:
    subversion/trunk/subversion/mod_dav_svn/liveprops.c

Modified: subversion/trunk/subversion/mod_dav_svn/liveprops.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/liveprops.c?rev=1237720&r1=1237719&r2=1237720&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/liveprops.c Mon Jan 30 15:36:34 2012
@@ -25,6 +25,7 @@
 
 #include <httpd.h>
 #include <http_core.h>
+#include <http_log.h>
 #include <util_xml.h>
 #include <mod_dav.h>
 
@@ -377,7 +378,12 @@ insert_prop_internal(const dav_resource 
                                            scratch_pool);
             if (serr != NULL)
               {
-                /* ### what to do? */
+                ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                              resource->info->r,
+                              "Can't get created-rev of '%s': "
+                              "%s",
+                              resource->info->repos_path,
+                              serr->message);
                 svn_error_clear(serr);
                 value = "###error###";
                 break;
@@ -395,7 +401,12 @@ insert_prop_internal(const dav_resource 
                                 scratch_pool);
         if (serr)
           {
-            /* ### what to do? */
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                          resource->info->r,
+                          "Can't get author of r%ld: "
+                          "%s",
+                          committed_rev,
+                          serr->message);
             svn_error_clear(serr);
             value = "###error###";
             break;
@@ -538,7 +549,13 @@ insert_prop_internal(const dav_resource 
                                      scratch_pool);
           if (serr != NULL)
             {
-              /* ### what to do? */
+              ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                            resource->info->r,
+                            "Can't get youngest revision in '%s': "
+                            "%s",
+                            svn_fs_path(resource->info->repos->fs,
+                                        scratch_pool),
+                            serr->message);
               svn_error_clear(serr);
               value = "###error###";
               break;
@@ -612,7 +629,12 @@ insert_prop_internal(const dav_resource 
                                          scratch_pool);
           if (serr != NULL)
             {
-              /* ### what to do? */
+              ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                            resource->info->r,
+                            "Can't get created-rev of '%s': "
+                            "%s",
+                            resource->info->repos_path,
+                            serr->message);
               svn_error_clear(serr);
               value = "###error###";
               break;
@@ -651,7 +673,12 @@ insert_prop_internal(const dav_resource 
                                       scratch_pool);
           if (serr != NULL)
             {
-              /* ### what to do? */
+              ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                            resource->info->r,
+                            "Can't get fetch or compute md5 checksum of '%s': "
+                            "%s",
+                            resource->info->repos_path,
+                            serr->message);
               svn_error_clear(serr);
               value = "###error###";
               break;
@@ -671,7 +698,12 @@ insert_prop_internal(const dav_resource 
       serr = svn_fs_get_uuid(resource->info->repos->fs, &value, scratch_pool);
       if (serr != NULL)
         {
-          /* ### what to do? */
+          ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                        resource->info->r,
+                        "Can't fetch UUID of '%s': "
+                        "%s",
+                        svn_fs_path(resource->info->repos->fs, scratch_pool),
+                        serr->message);
           svn_error_clear(serr);
           value = "###error###";
           break;
@@ -691,7 +723,12 @@ insert_prop_internal(const dav_resource 
                                     resource->info->repos_path, scratch_pool);
         if (serr != NULL)
           {
-            /* ### what to do? */
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                          resource->info->r,
+                          "Can't fetch proplist of '%s': "
+                          "%s",
+                          resource->info->repos_path,
+                          serr->message);
             svn_error_clear(serr);
             value = "###error###";
             break;


Reply via email to