improved logging
authorDaniel Kouřil <kouril@ics.muni.cz>
Tue, 31 May 2011 12:17:32 +0000 (12:17 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Tue, 31 May 2011 12:17:32 +0000 (12:17 +0000)
org.glite.px.proxyrenewal/src/renewal_core.c
org.glite.px.proxyrenewal/src/voms.c

index 7852b14..a2944a5 100644 (file)
@@ -250,7 +250,7 @@ glite_renewal_core_init_ctx(glite_renewal_core_context *context)
    if (p == NULL)
       return ENOMEM;
 
-   p->log_level = LOG_ERR;
+   p->log_level = LOG_WARNING;
    p->log_dst = GLITE_RENEWAL_LOG_SYSLOG;
 
    *context = p;
index 5a775b0..4c6a6d7 100644 (file)
@@ -218,8 +218,9 @@ renew_voms_cert(glite_renewal_core_context ctx, struct vomsdata *vd, struct voms
          goto end;
       }
       err_msg = VOMS_ErrorMessage(vd, voms_error, NULL, 0);
-      glite_renewal_core_set_err(ctx,
-                   "Failed to contact VOMS server %s of VO %s: %s",
+      edg_wlpr_Log(ctx, LOG_WARNING,
+                   "Failed to contact the origin VOMS server %s for %s: %s. "
+                  "Retrying with local VOMS configuration.",
                    voms_server, (*voms_cert)->voname, err_msg);
       free(err_msg);
    }
@@ -246,13 +247,17 @@ renew_voms_cert(glite_renewal_core_context ctx, struct vomsdata *vd, struct voms
           break;
        }
        err_msg = VOMS_ErrorMessage(vd, voms_error, NULL, 0);
-       glite_renewal_core_set_err(ctx,
-                    "Failed to contact VOMS server %s of VO %s: %s",
+       edg_wlpr_Log(ctx, LOG_WARNING,
+                    "Failed to contact VOMS server %s of VO '%s': %s",
                     (*c)->host, (*voms_cert)->voname, err_msg);
        free(err_msg);
    }
    ret = (ret == 0) ? -1 : 0;
 
+   if (ret)
+       glite_renewal_core_set_err(ctx, "Failed to contact all known VOMS servers for VO '%s'",
+                                 (*voms_cert)->voname);
+
 end:
    VOMS_DeleteContacts(voms_contacts);