Class Slf4jConfig

    • Constructor Detail

      • Slf4jConfig

        public Slf4jConfig()
    • Method Detail

      • getMarker

        public Marker getMarker()
        The state of the marker.
        Returns:
        the marker instance
      • marker

        public Slf4jConfig marker​(Marker marker)
        Mark all logged metrics with the given marker.
        Parameters:
        marker - an SLF4J Marker
        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 Logger getLogger()
        The state of the logger.
        Returns:
        the logger instance
      • logger

        public Slf4jConfig logger​(Logger logger)
        Log metrics to the given logger.
        Parameters:
        logger - an SLF4J Logger
        Returns:
        this
      • isEnabled

        public boolean isEnabled()
        The state of the Slf4j publisher.
        Returns:
        the state of the Console publisher
      • enable

        public Slf4jConfig enable​(boolean enabled)
        Set the state of the Slf4j publisher.
        Parameters:
        enabled - True if metrics are published to the logger. False otherwise
        Returns:
        this