public class Slf4jConfig extends ScheduledReporterConfigSupport<Slf4jConfig>
Constructor and Description |
---|
Slf4jConfig() |
Modifier and Type | Method and Description |
---|---|
Slf4jConfig |
durationUnit(TimeUnit durationUnit)
Convert durations to the given time unit.
|
Slf4jConfig |
enable(boolean enabled)
Set the state of the Slf4j publisher.
|
TimeUnit |
getDurationUnit()
The state of the duration time unit.
|
Logger |
getLogger()
The state of the logger.
|
com.codahale.metrics.Slf4jReporter.LoggingLevel |
getLogLevel()
The state of the logging level.
|
Marker |
getMarker()
The state of the marker.
|
String |
getPrefix()
The logger prefix.
|
TimeUnit |
getRateUnit()
The state of the rate time unit.
|
boolean |
isEnabled()
The state of the Slf4j publisher.
|
Slf4jConfig |
logger(Logger logger)
Log metrics to the given logger.
|
Slf4jConfig |
logLevel(com.codahale.metrics.Slf4jReporter.LoggingLevel logLevel)
Use Logging Level when reporting.
|
Slf4jConfig |
marker(Marker marker)
Mark all logged metrics with the given marker.
|
Slf4jConfig |
prefix(String prefix)
Prefix all metric names with the given string.
|
Slf4jConfig |
rateUnit(TimeUnit rateUnit)
Convert rates to the given time unit.
|
getReporterInterval, reporterInterval
excludeFilter, getExcludeFilter, getIncludeFilter, includeFilter
public Marker getMarker()
public Slf4jConfig marker(Marker marker)
marker
- an SLF4J Marker
this
public String getPrefix()
public Slf4jConfig prefix(String prefix)
prefix
- the prefix for all metric namesthis
public TimeUnit getDurationUnit()
public Slf4jConfig durationUnit(TimeUnit durationUnit)
durationUnit
- a unit of timethis
public TimeUnit getRateUnit()
public Slf4jConfig rateUnit(TimeUnit rateUnit)
rateUnit
- a unit of timethis
public com.codahale.metrics.Slf4jReporter.LoggingLevel getLogLevel()
public Slf4jConfig logLevel(com.codahale.metrics.Slf4jReporter.LoggingLevel logLevel)
logLevel
- a (@link LoggingLevel}this
public Logger getLogger()
public Slf4jConfig logger(Logger logger)
logger
- an SLF4J Logger
this
public boolean isEnabled()
public Slf4jConfig enable(boolean enabled)
enabled
- True if metrics are published to the logger. False otherwisethis