Package io.dropwizard.metrics.common
Class Slf4jReporterFactory
java.lang.Object
io.dropwizard.metrics.common.BaseReporterFactory
io.dropwizard.metrics.common.Slf4jReporterFactory
- All Implemented Interfaces:
io.dropwizard.jackson.Discoverable,ReporterFactory
A
ReporterFactory for Slf4jReporter instances.
Configuration Parameters:
| Name | Default | Description |
| logger | metrics | The name of the logger to write metrics to. |
| markerName | (none) | The name of the marker to mark logged metrics with. |
See BaseReporterFactory for more options. |
||
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.codahale.metrics.ScheduledReporterbuild(com.codahale.metrics.MetricRegistry registry) Configures and builds aScheduledReporterinstance for the given registry.org.slf4j.Logger@Nullable StringvoidsetLoggerName(String loggerName) voidsetMarkerName(@Nullable String markerName) Methods inherited from class io.dropwizard.metrics.common.BaseReporterFactory
getDisabledAttributes, getDurationUnit, getExcludes, getExcludesAttributes, getFilter, getFrequency, getIncludes, getIncludesAttributes, getRateUnit, getUseRegexFilters, getUseSubstringMatching, setDurationUnit, setExcludes, setExcludesAttributes, setFrequency, setIncludes, setIncludesAttributes, setRateUnit, setUseRegexFilters, setUseSubstringMatching
-
Constructor Details
-
Slf4jReporterFactory
public Slf4jReporterFactory()
-
-
Method Details
-
getLoggerName
-
setLoggerName
-
getLogger
public org.slf4j.Logger getLogger() -
getMarkerName
-
setMarkerName
-
build
public com.codahale.metrics.ScheduledReporter build(com.codahale.metrics.MetricRegistry registry) Description copied from interface:ReporterFactoryConfigures and builds aScheduledReporterinstance for the given registry.- Parameters:
registry- the metrics registry to report metrics from.- Returns:
- a reporter configured for the given metrics registry.
-