[
https://issues.apache.org/jira/browse/CURATOR-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15773313#comment-15773313
]
ASF GitHub Bot commented on CURATOR-369:
----------------------------------------
GitHub user swallez opened a pull request:
https://github.com/apache/curator/pull/179
[CURATOR-369] Improve log for new configuration events
Logging the configuration data only after it has been parsed into a
`Properties` object. This allows logging readable text instead of an array of
bytes.
Also guarded the log statement with a test on the log level, as
`Properties.toString()` is a costly operation.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/swallez/curator CURATOR-369
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/curator/pull/179.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #179
----
commit 69454859bb8ef1f0d683f9bc79af019d7a527f1e
Author: Sylvain Wallez <[email protected]>
Date: 2016-12-23T17:17:45Z
[CURATOR-369] Improve log for new configuration events
----
> Improve log format in EnsembleTracker.processConfigData()
> ---------------------------------------------------------
>
> Key: CURATOR-369
> URL: https://issues.apache.org/jira/browse/CURATOR-369
> Project: Apache Curator
> Issue Type: Bug
> Components: Framework
> Affects Versions: 3.2.1
> Reporter: Sylvain Wallez
> Priority: Minor
>
> EnsembleFrameworkTracker has a [log
> statement|https://github.com/apache/curator/blob/CURATOR-3.0/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java#L182]
> that doesn't format its value correctly and is adding noise in log files.
> Sample output of this statement is as follows:
> {noformat}
> [2016-12-09 12:16:26,046][INFO
> ][org.apache.curator.framework.imps.EnsembleTracker][] New config event
> received: [115, 101, 114, 118, 101, 114, 46, 49, 48, 61, 108, 111, 99, 97,
> 108, 104, 111, 115, 116, 58, 50, 56, 57, 56, 58, 51, 56, 57, 56, 58, 112, 97,
> 114, 116, 105, 99, 105, 112, 97, 110, 116, 59, 48, 46, 48, 46, 48, 46, 48,
> 58, 50, 49, 57, 49, 10, 118, 101, 114, 115, 105, 111, 110, 61, 49, 48, 48,
> 48, 48, 48, 48, 48, 48]
> {noformat}
> I'd like to provide a fix for this by logging the properties object once it's
> been parsed, but I'm confused about what branch to patch against. This class
> exists in the CURATOR-3.0 branch, but not in master.
> Is creating a PR against the CURATOR-3.0 branch the way to go?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)