You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Jungtaek Lim (JIRA)" <ji...@apache.org> on 2017/08/30 05:32:00 UTC

[jira] [Updated] (STORM-1767) metrics log entries are being appended to root log

     [ https://issues.apache.org/jira/browse/STORM-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jungtaek Lim updated STORM-1767:
--------------------------------
    Fix Version/s:     (was: 2.0.0)
                       (was: 1.0.0)

> metrics log entries are being appended to root log
> --------------------------------------------------
>
>                 Key: STORM-1767
>                 URL: https://issues.apache.org/jira/browse/STORM-1767
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-core
>    Affects Versions: 1.0.0, 2.0.0
>            Reporter: Daniel Drozdzewski
>              Labels: easyfix
>
> Current setup of metrics logger ( {{storm/log4j2/worker.xml}}) uses fully qualified name of the class where the logging is happening from i.e `org.apache.storm.metric.LoggingMetricsConsumer`, which is problematic and does not achieve the original intent as stated by the METRICS appender defined in {{storm/log4j2/worker.xml}}.
> Currently the metrics logger created explicitly by using the name above:
> {{LoggerFactory.getLogger("org.apache.storm.metric.LoggingMetricsConsumer")}} or implicitly from within the {{LoggingMetricsConsumer}} by calling {{LoggerFactory.getLogger(LoggingMetricsConsumer.class)}} will be logging to **root** logger.
> This happens because logger names use Java namespaces and as such create hierarchies. 
> The solution is to name metrics logger outside of {{org.apache.storm.*}} namespace which is what is happening for all other non-root loggers defined within the {{storm/log4j2/worker.xml}} file. 
> This will also mean a code change to {{LoggingMetricsConsumer}} class itself for it to use the logger with an explicit name matching the name defined in the {{worker.xml}} file.
> The fix is easy. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)