You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cs...@apache.org on 2021/01/27 10:39:03 UTC

[sling-org-apache-sling-distribution-journal] branch master updated: SLING-10098 - Log url of content package on errors

This is an automated email from the ASF dual-hosted git repository.

cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git


The following commit(s) were added to refs/heads/master by this push:
     new 66cc5c4  SLING-10098 - Log url of content package on errors
66cc5c4 is described below

commit 66cc5c4b867a6a66963a2ebdd5118f7de91adbee
Author: Christian Schneider <cs...@adobe.com>
AuthorDate: Wed Jan 27 11:38:02 2021 +0100

    SLING-10098 - Log url of content package on errors
---
 .../apache/sling/distribution/journal/bookkeeper/BookKeeper.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java b/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java
index b2962b4..30e761b 100644
--- a/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java
+++ b/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java
@@ -192,13 +192,13 @@ public class BookKeeper implements Closeable {
         String pubAgentName = pkgMsg.getPubAgentName();
         int retries = packageRetries.get(pubAgentName);
         if (errorQueueEnabled && retries >= config.getMaxRetries()) {
-            log.warn("Failed to import distribution package {} at offset {} after {} retries, removing the package.", 
-                    pkgMsg.getPkgId(), offset, retries);
+            log.warn("Failed to import distribution package {} at offset {} after {} retries, removing the package. Url {}", 
+                    pkgMsg.getPkgId(), offset, retries, pkgMsg.getPkgBinaryRef());
             removeFailedPackage(pkgMsg, offset);
         } else {
             packageRetries.increase(pubAgentName);
             String retriesSt = errorQueueEnabled ? Integer.toString(config.getMaxRetries()) : "infinite";
-            String msg = format("Error processing distribution package %s. Retry attempts %s/%s. Message: %s", pkgMsg.getPkgId(), retries, retriesSt, e.getMessage());
+            String msg = format("Error processing distribution package %s. Retry attempts %s/%s. Url: {}, Message: %s", pkgMsg.getPkgId(), retries, retriesSt, pkgMsg.getPkgBinaryRef(), e.getMessage());
             LogMessage logMessage = getLogMessage(pubAgentName, msg, e);
             logSender.accept(logMessage);
             throw new DistributionException(msg, e);