Class ThrottledLogger

java.lang.Object
io.camunda.zeebe.util.logging.ThrottledLogger
All Implemented Interfaces:
org.slf4j.Logger

public class ThrottledLogger extends Object implements org.slf4j.Logger
Logger that logs only once every configured interval.

Example:

 while(condition) {
     log.info("repeated log");
 }
 
When ThrottledLogger is used, this is not logged in every loop. Instead, it will be logged once in every configured interval.
  • Constructor Details

    • ThrottledLogger

      public ThrottledLogger(org.slf4j.Logger log, Duration interval)
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.slf4j.Logger
    • isTraceEnabled

      public boolean isTraceEnabled()
      Specified by:
      isTraceEnabled in interface org.slf4j.Logger
    • trace

      public void trace(String s)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(String s, Object o)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(String s, Object o, Object o1)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(String s, Object... objects)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(String s, Throwable throwable)
      Specified by:
      trace in interface org.slf4j.Logger
    • isTraceEnabled

      public boolean isTraceEnabled(org.slf4j.Marker marker)
      Specified by:
      isTraceEnabled in interface org.slf4j.Logger
    • trace

      public void trace(org.slf4j.Marker marker, String s)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(org.slf4j.Marker marker, String s, Object o)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(org.slf4j.Marker marker, String s, Object o, Object o1)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(org.slf4j.Marker marker, String s, Object... objects)
      Specified by:
      trace in interface org.slf4j.Logger
    • trace

      public void trace(org.slf4j.Marker marker, String s, Throwable throwable)
      Specified by:
      trace in interface org.slf4j.Logger
    • isDebugEnabled

      public boolean isDebugEnabled()
      Specified by:
      isDebugEnabled in interface org.slf4j.Logger
    • debug

      public void debug(String s)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(String s, Object o)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(String s, Object o, Object o1)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(String s, Object... objects)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(String s, Throwable throwable)
      Specified by:
      debug in interface org.slf4j.Logger
    • isDebugEnabled

      public boolean isDebugEnabled(org.slf4j.Marker marker)
      Specified by:
      isDebugEnabled in interface org.slf4j.Logger
    • debug

      public void debug(org.slf4j.Marker marker, String s)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(org.slf4j.Marker marker, String s, Object o)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(org.slf4j.Marker marker, String s, Object o, Object o1)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(org.slf4j.Marker marker, String s, Object... objects)
      Specified by:
      debug in interface org.slf4j.Logger
    • debug

      public void debug(org.slf4j.Marker marker, String s, Throwable throwable)
      Specified by:
      debug in interface org.slf4j.Logger
    • isInfoEnabled

      public boolean isInfoEnabled()
      Specified by:
      isInfoEnabled in interface org.slf4j.Logger
    • info

      public void info(String s)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(String s, Object o)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(String s, Object o, Object o1)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(String s, Object... objects)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(String s, Throwable throwable)
      Specified by:
      info in interface org.slf4j.Logger
    • isInfoEnabled

      public boolean isInfoEnabled(org.slf4j.Marker marker)
      Specified by:
      isInfoEnabled in interface org.slf4j.Logger
    • info

      public void info(org.slf4j.Marker marker, String s)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(org.slf4j.Marker marker, String s, Object o)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(org.slf4j.Marker marker, String s, Object o, Object o1)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(org.slf4j.Marker marker, String s, Object... objects)
      Specified by:
      info in interface org.slf4j.Logger
    • info

      public void info(org.slf4j.Marker marker, String s, Throwable throwable)
      Specified by:
      info in interface org.slf4j.Logger
    • isWarnEnabled

      public boolean isWarnEnabled()
      Specified by:
      isWarnEnabled in interface org.slf4j.Logger
    • warn

      public void warn(String s)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(String s, Object o)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(String s, Object... objects)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(String s, Object o, Object o1)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(String s, Throwable throwable)
      Specified by:
      warn in interface org.slf4j.Logger
    • isWarnEnabled

      public boolean isWarnEnabled(org.slf4j.Marker marker)
      Specified by:
      isWarnEnabled in interface org.slf4j.Logger
    • warn

      public void warn(org.slf4j.Marker marker, String s)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(org.slf4j.Marker marker, String s, Object o)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(org.slf4j.Marker marker, String s, Object o, Object o1)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(org.slf4j.Marker marker, String s, Object... objects)
      Specified by:
      warn in interface org.slf4j.Logger
    • warn

      public void warn(org.slf4j.Marker marker, String s, Throwable throwable)
      Specified by:
      warn in interface org.slf4j.Logger
    • isErrorEnabled

      public boolean isErrorEnabled()
      Specified by:
      isErrorEnabled in interface org.slf4j.Logger
    • error

      public void error(String s)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(String s, Object o)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(String s, Object o, Object o1)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(String s, Object... objects)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(String s, Throwable throwable)
      Specified by:
      error in interface org.slf4j.Logger
    • isErrorEnabled

      public boolean isErrorEnabled(org.slf4j.Marker marker)
      Specified by:
      isErrorEnabled in interface org.slf4j.Logger
    • error

      public void error(org.slf4j.Marker marker, String s)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(org.slf4j.Marker marker, String s, Object o)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(org.slf4j.Marker marker, String s, Object o, Object o1)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(org.slf4j.Marker marker, String s, Object... objects)
      Specified by:
      error in interface org.slf4j.Logger
    • error

      public void error(org.slf4j.Marker marker, String s, Throwable throwable)
      Specified by:
      error in interface org.slf4j.Logger