You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2017/12/15 08:19:00 UTC
[jira] [Commented] (OAK-7064) Remove duplicated code from the
FileStore logging implementation
[ https://issues.apache.org/jira/browse/OAK-7064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16292189#comment-16292189 ]
Michael Dürig commented on OAK-7064:
------------------------------------
LGTM, this is something that was bothering me for some time already. Apparently not enough to fix it myself ;-) A further step would be better encapsulation of {{GC_COUNT}} and to get rid of that static field.
re. {{GCListener.withLogPrefix()}}: I would probably not pass in arguments but only a prefix string and leave the formatting to the caller. Also making this a default method of the {{GCListener}} interface makes for nice call site semantics but is a bit of a misuse of the default method feature as it implies that {{withLogPrefix()}} is a method intended to be overridden.
> Remove duplicated code from the FileStore logging implementation
> ----------------------------------------------------------------
>
> Key: OAK-7064
> URL: https://issues.apache.org/jira/browse/OAK-7064
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Francesco Mari
> Assignee: Francesco Mari
> Priority: Minor
> Fix For: 1.7.13, 1.8
>
> Attachments: OAK-7064-01.patch
>
>
> The {{FileStore}} follows some implicit guidelines when it comes to its logging messages, e.g. prefixing every message with the GC cycle number, and outputting times and sizes both in a human readable and machine readable way.
> These guidelines are implemented ad-hoc, by appropriately crafting each log message individually. This approach leads to clutter and duplicated code. It would be beneficial to the internal quality of the {{FileStore}} if all these concerns were instead implemented in a centralised way.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)