Class ThrottlingLogger

java.lang.Object
io.opentelemetry.sdk.internal.ThrottlingLogger

public class ThrottlingLogger extends Object
Will limit the number of log messages emitted, so as not to spam when problems are happening.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Constructor Details

    • ThrottlingLogger

      public ThrottlingLogger(Logger delegate)
      Create a new logger which will enforce a max number of messages per minute.
  • Method Details

    • log

      public void log(Level level, String message)
      Log a message at the given level.
    • log

      public void log(Level level, String message, @Nullable Throwable throwable)
      Log a message at the given level with a throwable.
    • isLoggable

      public boolean isLoggable(Level level)
      Returns whether the current wrapped logger is set to log at the given level.
      Returns:
      true if the logger set to log at the requested level.