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

ASF GitHub Bot commented on FLINK-5307:
---------------------------------------

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/2979

    [FLINK-5307] [metrics] Log reporter configuration

    With this PR the configuration for every reporter will be logged. Twice.
    
    First, we log the `Properties` object that contains the configuration for 
each reporter _before_ passing it to the reporter. This allows users to detect 
missing properties that are result of types in the reporter name or preceding 
parts of the config key, i.e "metrics.reporter".
    
    This logs something like this:
    ```
    2016-12-09 13:40:50,287 INFO  
org.apache.flink.metrics.runtime.MetricRegistry                - Configuring 
StatsDReporter with {port=8125, host=localhost, 
class=org.apache.flink.metrics.statsd.StatsDReporter}
    ```
    
    Second, we log in each reporter which properties were actually used from 
the configuration. In conjunction with the above this allows users to detect 
typos in specific properties, by checking which properties that were supposedly 
configured but not used in the end.
    
    This logs:
    ```
    2016-12-09 13:40:50,287 INFO  
org.apache.flink.metrics.statsd.StatsDReporter                - Configured 
StatsDReporter with {host:localhost, port:8125}
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 5307_log_rep_config

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2979.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 #2979
    
----
commit 73e0eccae5e271eadd0831aefa14389cadecac8d
Author: zentol <[email protected]>
Date:   2016-12-09T12:25:11Z

    [FLINK-5307] [metrics] Log reporter configuration

----


> Log configuration for every reporter
> ------------------------------------
>
>                 Key: FLINK-5307
>                 URL: https://issues.apache.org/jira/browse/FLINK-5307
>             Project: Flink
>          Issue Type: Bug
>          Components: Metrics
>    Affects Versions: 1.2.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>             Fix For: 1.2.0
>
>
> Mandatory properties, like host names or ports, generally lead to exceptions 
> if they are wrongly configured. Optional properties however revert to 
> default-values in case these properties are not configured at all.
> Logging all configured properties will make it easier to find typos/missing 
> optional properties in the configuration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to