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

2016-05-15 Thread Jungtaek Lim (JIRA)

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

Jungtaek Lim commented on STORM-1767:
-

I don't see this issue. metrics logs are properly logged to *.metrics file.
Did you miss that additivity is set to "false"?

> 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
> Fix For: 1.0.0, 2.0.0
>
>
> 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.3.4#6332)


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

2016-05-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on STORM-1767:
---

Github user diginoise commented on the pull request:


https://github.com/apache/storm/commit/96da31ed0068dde3b4309ee417382be5084ce941#commitcomment-17368296
  
Jira ticket created: https://issues.apache.org/jira/browse/STORM-1767


> 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
> Fix For: 1.0.0, 2.0.0
>
>
> 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.3.4#6332)