Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-1767

metrics log entries are being appended to root log

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0.0, 2.0.0
    • None
    • storm-core

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            diginoise Daniel Drozdzewski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: