You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/11/03 01:28:43 UTC

svn commit: r470616 - /incubator/roller/trunk/src/org/apache/roller/business/pings/PingQueueProcessor.java

Author: agilliland
Date: Thu Nov  2 16:28:43 2006
New Revision: 470616

URL: http://svn.apache.org/viewvc?view=rev&rev=470616
Log:
changing logging behavior so that you only get a warning if a ping fails for the last time, rather than repeating the message for each failed attempt.


Modified:
    incubator/roller/trunk/src/org/apache/roller/business/pings/PingQueueProcessor.java

Modified: incubator/roller/trunk/src/org/apache/roller/business/pings/PingQueueProcessor.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/pings/PingQueueProcessor.java?view=diff&rev=470616&r1=470615&r2=470616
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/pings/PingQueueProcessor.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/pings/PingQueueProcessor.java Thu Nov  2 16:28:43 2006
@@ -154,20 +154,19 @@
      * @param ex             the exception that occurred on the ping attempt
      * @throws RollerException
      */
-    private void handlePingError(PingQueueEntryData pingQueueEntry,
-            Exception ex)
+    private void handlePingError(PingQueueEntryData pingQueueEntry, Exception ex)
             throws RollerException {
         
         if ((pingQueueEntry.incrementAttempts() < PingConfig.getMaxPingAttempts()) && WeblogUpdatePinger.shouldRetry(ex)) {
             // We have attempts remaining, and it looks like we should retry,
             // so requeue the entry for processing on subsequent rounds
-            logger.warn("Error on ping attempt (" + pingQueueEntry.getAttempts() + ") for " + pingQueueEntry + ": [" + ex.getMessage() + "]. Will re-queue for later attempts.");
-            if (logger.isDebugEnabled()) logger.debug("Error on last ping attempt was: ", ex);
+            logger.debug("Error on ping attempt (" + pingQueueEntry.getAttempts() + ") for " + pingQueueEntry + ": [" + ex.getMessage() + "]. Will re-queue for later attempts.");
+            logger.debug("Error on last ping attempt was: ", ex);
             pingQueueMgr.saveQueueEntry(pingQueueEntry);
         } else {
             // Remove the entry
             logger.warn("Error on ping attempt (" + pingQueueEntry.getAttempts() + ") for " + pingQueueEntry + ": [" + ex.getMessage() + "].  Entry will be REMOVED from ping queue.");
-            if (logger.isDebugEnabled()) logger.debug("Error on last ping attempt was: ", ex);
+            logger.debug("Error on last ping attempt was: ", ex);
             pingQueueMgr.removeQueueEntry(pingQueueEntry);
             // TODO: mark ping target invalid?
         }