Package org.apache.storm.metric

## Class LoggingMetricsConsumer

- java.lang.Object
- - org.apache.storm.metric.LoggingMetricsConsumer

- All Implemented Interfaces:
    `IMetricsConsumer`

      public class LoggingMetricsConsumer
      extends Object
      implements IMetricsConsumer

  Listens for all metrics, dumps them to log

  To use, add this to your topology's configuration:

  ```java conf.registerMetricsConsumer(org.apache.storm.metrics.LoggingMetricsConsumer.class, 1); ```

  Or edit the storm.yaml config file:

  ```yaml topology.metrics.consumer.register: - class: "org.apache.storm.metrics.LoggingMetricsConsumer" parallelism.hint: 1 ```

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.storm.metric.api.IMetricsConsumer

      `IMetricsConsumer.DataPoint, IMetricsConsumer.TaskInfo`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static org.slf4j.Logger` | `LOG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LoggingMetricsConsumer()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `cleanup()` |
    `void` | `handleDataPoints​(IMetricsConsumer.TaskInfo taskInfo, Collection<IMetricsConsumer.DataPoint> dataPoints)` |
    `void` | `prepare​(Map<String,​Object> topoConf, Object registrationArgument, TopologyContext context, IErrorReporter errorReporter)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### LOG

          public static final org.slf4j.Logger LOG

  - ### Constructor Detail

    - #### LoggingMetricsConsumer

          public LoggingMetricsConsumer()

  - ### Method Detail

    - #### prepare

          public void prepare​(Map<String,​Object> topoConf,
                              Object registrationArgument,
                              TopologyContext context,
                              IErrorReporter errorReporter)

      Specified by:
        `prepare` in interface `IMetricsConsumer`

    - #### handleDataPoints

          public void handleDataPoints​(IMetricsConsumer.TaskInfo taskInfo,
                                       Collection<IMetricsConsumer.DataPoint> dataPoints)

      Specified by:
        `handleDataPoints` in interface `IMetricsConsumer`

    - #### cleanup

          public void cleanup()

      Specified by:
        `cleanup` in interface `IMetricsConsumer`