[
https://issues.apache.org/jira/browse/SLING-10602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17414738#comment-17414738
]
Mohit Arora edited comment on SLING-10602 at 9/14/21, 5:53 AM:
---------------------------------------------------------------
PR - https://github.com/apache/sling-org-apache-sling-distribution-core/pull/55
[~marett], [~cschneider], [~ashishc] can you please review?
This improved logging would help us diagnose the failing distribution in case
of brandportal.
was (Author: mohiaror):
PR - https://github.com/apache/sling-org-apache-sling-distribution-core/pull/55
[~marett], [~cschneider], [~ashishc] can you please review?
> DistributionQueueItem's path should be correctly logged in case of success
> and failure
> --------------------------------------------------------------------------------------
>
> Key: SLING-10602
> URL: https://issues.apache.org/jira/browse/SLING-10602
> Project: Sling
> Issue Type: Bug
> Components: Content Distribution
> Affects Versions: Content Distribution Core 0.4.6
> Reporter: Mohit Arora
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The [process method of
> SimpleDistributionAgentQueueProcessor|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L83-L103]
> logs debug and error logs to indicate the processing and failure of
> individual queue items. It basically just prints the queueItem, the [toString
> method of
> whose|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/queue/DistributionQueueItem.java#L67]
> prints the info map of the item as String. But the valuemap also contains
> some multivalue properties like paths and deepPaths, resulting in logged
> string to look like below -
> {noformat}[sling-default-4-resource-queueProcessor-bpdistributionagent0-queue-bpdistributionagent0]
> org.apache.sling.distribution.agent.impl.SimpleDistributionAgent
> [agent][bpdistributionagent0] [queue-bpdistributionagent*0] ITEM-FAIL
> item=DistributionQueueItem{id='dstrpck-1610659801578-afcff2aa-79b4-437c-a248-8021b743ebb9',*
> info=org.apache.sling.distribution.queue.DistributionQueueItem@891d3504 :
> {item.id=dstrpck-1610659801578-afcff2aa-79b4-437c-a248-8021b743ebb9,
> internal.request.startTime=1610659801558, package.size=705, request.type=ADD,
> request.deepPaths=[Ljava.lang.String;@116219, internal.request.id=DSTRQ10,
> request.paths=[Ljava.lang.String;@7eef9f32,
> internal.request.user=dam-replication-service,
> package.type=signed-url}}{noformat}
> For debug purposes it would be helpful if we can map a queueItem to an actual
> resource through the path.
> cc - [~ashishc]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)