[ 
https://issues.apache.org/jira/browse/SLING-10066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17300407#comment-17300407
 ] 

Timothee Maret commented on SLING-10066:
----------------------------------------

There are many locations in the code where we create an ad-hoc log statement 
around the PackageMessage. We should align all of them. Updated the 
PackageMessage#toString method in 
https://github.com/apache/sling-org-apache-sling-distribution-journal-messages/commit/18883d974b3bcfa680ec014f0c62a28bb83a2fba
 such that we can use it consistently. The toString implementation includes all 
relevant data and strip list of paths and binaries.

> cleanup logging for content distribution
> ----------------------------------------
>
>                 Key: SLING-10066
>                 URL: https://issues.apache.org/jira/browse/SLING-10066
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content Distribution
>    Affects Versions: Content Distribution Journal Core 0.1.16
>            Reporter: Joerg Hoh
>            Assignee: Timothée Maret
>            Priority: Major
>             Fix For: Content Distribution Journal Core 0.1.18, Content 
> Distribution Journal Messages 0.3.0
>
>
> When submitting content for distribution I get these 4 log entries for a 
> single submission (using the package-id as identifier):
> {code:java}
> 15.01.2021 14:30:05.168 *INFO* [192.147.128.10 [1610721005131] POST 
> /bin/replicate.json HTTP/1.1] 
> org.apache.sling.distribution.journal.impl.publisher.PackageMessageFactory 
> Creating package binary with id [f4fce37b-f160-40b0-9284-7b696a954630] for 
> package [dstrpck-1610721005168-00bd582b-1f91-4abc-82b6-a80afa2a0483], length 
> [8343]
> 15.01.2021 14:30:05.243 *INFO* [Message Poller PackageMessage handled by 
> MessagingCacheCallback$$Lambda$532/0x000000080108fc40] 
> org.apache.sling.distribution.journal.queue.impl.PubQueueCache Queueing 
> message 
> package-id=dstrpck-1610721005168-00bd582b-1f91-4abc-82b6-a80afa2a0483, 
> offset=1023083
> 15.01.2021 14:30:17.716 *INFO* [sling-default-1-Registered Service.5223] 
> org.apache.sling.distribution.journal.impl.publisher.PackageDistributedNotifier
>  Sending distributed notifications for pub agent publish queue item 
> dstrpck-1610721005168-00bd582b-1f91-4abc-82b6-a80afa2a0483
> 15.01.2021 14:30:17.779 *INFO* [sling-default-1-Registered Service.5223] 
> org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher 
> [null] Succesfully applied package with id 
> dstrpck-1610721005168-00bd582b-1f91-4abc-82b6-a80afa2a0483, type ADD, paths 
> [/content/something]
> {code}
> While they are technically perfectly ok, I think that 4 messages are a bit 
> too much. I would suggest to change the loglevel for message 3 to DEBUG, 
> because it does not offer any useful information, which should be logged on 
> INFO.
>  I would also suggest to change message 4 to DEBUG (the fact that the package 
> is successfully distributed is implicit, because otherwise there would be an 
> error message), but I am indeed interested into the path which is 
> distributed. So it would be great if we could log that path(s) in either in 
> message 1 or 2.
> Overall this could reduce the noise in the logs if distribution is heavily 
> used.
> WDYT?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to