Package io.sentry
Class DiagnosticLogger
- java.lang.Object
-
- io.sentry.DiagnosticLogger
-
-
Constructor Summary
Constructors Constructor Description DiagnosticLogger(@NotNull SentryOptions options, @Nullable ILogger logger)
Creates a new instance of DiagnosticLogger with the wrapped ILogger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable ILogger
getLogger()
boolean
isEnabled(@Nullable SentryLevel level)
Whether this logger is enabled for the specified SentryLevel.void
log(@NotNull SentryLevel level, @NotNull java.lang.String message, @Nullable java.lang.Object... args)
Logs a message with the specified level, message and optional arguments.void
log(@NotNull SentryLevel level, @NotNull java.lang.String message, @Nullable java.lang.Throwable throwable)
Logs a message with the specified level, message and throwable.void
log(@NotNull SentryLevel level, @Nullable java.lang.Throwable throwable, @NotNull java.lang.String message, @Nullable java.lang.Object... args)
Logs a message with the specified level, throwable, message and optional arguments.
-
-
-
Constructor Detail
-
DiagnosticLogger
public DiagnosticLogger(@NotNull @NotNull SentryOptions options, @Nullable @Nullable ILogger logger)
Creates a new instance of DiagnosticLogger with the wrapped ILogger.- Parameters:
options
- a SentryOptions instancelogger
- a ILogger instance
-
-
Method Detail
-
isEnabled
public boolean isEnabled(@Nullable @Nullable SentryLevel level)
Whether this logger is enabled for the specified SentryLevel.
-
log
public void log(@NotNull @NotNull SentryLevel level, @NotNull @NotNull java.lang.String message, @Nullable @Nullable java.lang.Object... args)
Logs a message with the specified level, message and optional arguments.
-
log
public void log(@NotNull @NotNull SentryLevel level, @NotNull @NotNull java.lang.String message, @Nullable @Nullable java.lang.Throwable throwable)
Logs a message with the specified level, message and throwable.
-
log
public void log(@NotNull @NotNull SentryLevel level, @Nullable @Nullable java.lang.Throwable throwable, @NotNull @NotNull java.lang.String message, @Nullable @Nullable java.lang.Object... args)
Logs a message with the specified level, throwable, message and optional arguments.
-
getLogger
@TestOnly @Nullable public @Nullable ILogger getLogger()
-
-