public static class Slf4jReporter.Builder extends Object
CsvReporter
instances. Defaults to logging to metrics
, not
using a marker, converting rates to events/second, converting durations to milliseconds, and
not filtering metrics.Modifier and Type | Method and Description |
---|---|
Slf4jReporter |
build()
Builds a
Slf4jReporter with the given properties. |
Slf4jReporter.Builder |
convertDurationsTo(TimeUnit durationUnit)
Convert durations to the given time unit.
|
Slf4jReporter.Builder |
convertRatesTo(TimeUnit rateUnit)
Convert rates to the given time unit.
|
Slf4jReporter.Builder |
filter(MetricFilter filter)
Only report metrics which match the given filter.
|
Slf4jReporter.Builder |
markWith(org.slf4j.Marker marker)
Mark all logged metrics with the given marker.
|
Slf4jReporter.Builder |
outputTo(org.slf4j.Logger logger)
Log metrics to the given logger.
|
Slf4jReporter.Builder |
withLoggingLevel(Slf4jReporter.LoggingLevel loggingLevel)
Use Logging Level when reporting.
|
public Slf4jReporter.Builder outputTo(org.slf4j.Logger logger)
logger
- an SLF4J Logger
this
public Slf4jReporter.Builder markWith(org.slf4j.Marker marker)
marker
- an SLF4J Marker
this
public Slf4jReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit
- a unit of timethis
public Slf4jReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit
- a unit of timethis
public Slf4jReporter.Builder filter(MetricFilter filter)
filter
- a MetricFilter
this
public Slf4jReporter.Builder withLoggingLevel(Slf4jReporter.LoggingLevel loggingLevel)
loggingLevel
- a (@link Slf4jReporter.LoggingLevel}this
public Slf4jReporter build()
Slf4jReporter
with the given properties.Slf4jReporter
Copyright © 2014. All Rights Reserved.