Package io.dropwizard.metrics.common
Class Slf4jReporterFactory
- java.lang.Object
-
- io.dropwizard.metrics.common.BaseReporterFactory
-
- io.dropwizard.metrics.common.Slf4jReporterFactory
-
- All Implemented Interfaces:
Discoverable,ReporterFactory
public class Slf4jReporterFactory extends BaseReporterFactory
AReporterFactoryforSlf4jReporterinstances. 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 BaseReporterFactoryfor more options.
-
-
Constructor Summary
Constructors Constructor Description Slf4jReporterFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.codahale.metrics.ScheduledReporterbuild(com.codahale.metrics.MetricRegistry registry)Configures and builds aScheduledReporterinstance for the given registry.org.slf4j.LoggergetLogger()StringgetLoggerName()@Nullable StringgetMarkerName()voidsetLoggerName(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
-
-
-
-
Method Detail
-
getLoggerName
public String getLoggerName()
-
setLoggerName
public void setLoggerName(String loggerName)
-
getLogger
public org.slf4j.Logger getLogger()
-
getMarkerName
public @Nullable String getMarkerName()
-
setMarkerName
public void setMarkerName(@Nullable String markerName)
-
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.
-
-