Package io.sentry

Interface ILogger

All Known Implementing Classes:
DiagnosticLogger, NoOpLogger, SystemOutLogger

public interface ILogger
Sentry SDK internal logging interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isEnabled(@Nullable SentryLevel level)
    Whether this logger is enabled for the specified SentryLevel.
    void
    log(@NotNull SentryLevel level, @NotNull String message, @Nullable Object... args)
    Logs a message with the specified level, message and optional arguments.
    void
    log(@NotNull SentryLevel level, @NotNull String message, @Nullable Throwable throwable)
    Logs a message with the specified level, message and optional arguments.
    void
    log(@NotNull SentryLevel level, @Nullable Throwable throwable, @NotNull String message, @Nullable Object... args)
    Logs a message with the specified level, throwable, message and optional arguments.
  • Method Details

    • log

      void log(@NotNull @NotNull SentryLevel level, @NotNull @NotNull String message, @Nullable @Nullable Object... args)
      Logs a message with the specified level, message and optional arguments.
      Parameters:
      level - The SentryLevel.
      message - The message.
      args - The optional arguments to format the message.
    • log

      void log(@NotNull @NotNull SentryLevel level, @NotNull @NotNull String message, @Nullable @Nullable Throwable throwable)
      Logs a message with the specified level, message and optional arguments.
      Parameters:
      level - The SentryLevel.
      message - The message.
      throwable - The throwable to log.
    • log

      void log(@NotNull @NotNull SentryLevel level, @Nullable @Nullable Throwable throwable, @NotNull @NotNull String message, @Nullable @Nullable Object... args)
      Logs a message with the specified level, throwable, message and optional arguments.
      Parameters:
      level - The SentryLevel.
      throwable - The throwable to log.
      message - The message.
      args - the formatting arguments
    • isEnabled

      boolean isEnabled(@Nullable @Nullable SentryLevel level)
      Whether this logger is enabled for the specified SentryLevel.
      Parameters:
      level - The SentryLevel to test against.
      Returns:
      True if a log message would be recorded for the level. Otherwise false.