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