Package ratpack.dropwizard.metrics
Class Slf4jConfig
- java.lang.Object
-
- ratpack.dropwizard.metrics.ReporterConfigSupport<T>
-
- ratpack.dropwizard.metrics.ScheduledReporterConfigSupport<Slf4jConfig>
-
- ratpack.dropwizard.metrics.Slf4jConfig
-
public class Slf4jConfig extends ScheduledReporterConfigSupport<Slf4jConfig>
-
-
Constructor Summary
Constructors Constructor Description Slf4jConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Slf4jConfigdurationUnit(java.util.concurrent.TimeUnit durationUnit)Convert durations to the given time unit.java.util.concurrent.TimeUnitgetDurationUnit()The state of the duration time unit.org.slf4j.LoggergetLogger()The state of the logger.com.codahale.metrics.Slf4jReporter.LoggingLevelgetLogLevel()The state of the logging level.org.slf4j.MarkergetMarker()The state of the marker.java.lang.StringgetPrefix()The logger prefix.java.util.concurrent.TimeUnitgetRateUnit()The state of the rate time unit.Slf4jConfiglogger(org.slf4j.Logger logger)Log metrics to the given logger.Slf4jConfiglogLevel(com.codahale.metrics.Slf4jReporter.LoggingLevel logLevel)Use Logging Level when reporting.Slf4jConfigmarker(org.slf4j.Marker marker)Mark all logged metrics with the given marker.Slf4jConfigprefix(java.lang.String prefix)Prefix all metric names with the given string.Slf4jConfigrateUnit(java.util.concurrent.TimeUnit rateUnit)Convert rates to the given time unit.-
Methods inherited from class ratpack.dropwizard.metrics.ScheduledReporterConfigSupport
getReporterInterval, reporterInterval
-
Methods inherited from class ratpack.dropwizard.metrics.ReporterConfigSupport
enable, excludeFilter, getExcludeFilter, getIncludeFilter, includeFilter, isEnabled
-
-
-
-
Method Detail
-
getMarker
public org.slf4j.Marker getMarker()
The state of the marker.- Returns:
- the marker instance
-
marker
public Slf4jConfig marker(org.slf4j.Marker marker)
Mark all logged metrics with the given marker.- Parameters:
marker- an SLF4JMarker- Returns:
this
-
getPrefix
public java.lang.String getPrefix()
The logger prefix.- Returns:
- the prefix text
-
prefix
public Slf4jConfig prefix(java.lang.String prefix)
Prefix all metric names with the given string.- Parameters:
prefix- the prefix for all metric names- Returns:
this
-
getDurationUnit
public java.util.concurrent.TimeUnit getDurationUnit()
The state of the duration time unit.- Returns:
- the duration unit instance
-
durationUnit
public Slf4jConfig durationUnit(java.util.concurrent.TimeUnit durationUnit)
Convert durations to the given time unit.- Parameters:
durationUnit- a unit of time- Returns:
this
-
getRateUnit
public java.util.concurrent.TimeUnit getRateUnit()
The state of the rate time unit.- Returns:
- the rate unit instance
-
rateUnit
public Slf4jConfig rateUnit(java.util.concurrent.TimeUnit rateUnit)
Convert rates to the given time unit.- Parameters:
rateUnit- a unit of time- Returns:
this
-
getLogLevel
public com.codahale.metrics.Slf4jReporter.LoggingLevel getLogLevel()
The state of the logging level.- Returns:
- the log level instance
-
logLevel
public Slf4jConfig logLevel(com.codahale.metrics.Slf4jReporter.LoggingLevel logLevel)
Use Logging Level when reporting.- Parameters:
logLevel- a (@link LoggingLevel}- Returns:
this
-
getLogger
public org.slf4j.Logger getLogger()
The state of the logger.- Returns:
- the logger instance
-
logger
public Slf4jConfig logger(org.slf4j.Logger logger)
Log metrics to the given logger.- Parameters:
logger- an SLF4JLogger- Returns:
this
-
-