Package com.pspdfkit.utils
Class LogCatLogger
-
- All Implemented Interfaces:
-
com.pspdfkit.utils.PdfLog.Logger
public class LogCatLogger implements PdfLog.Logger
Logger that logs all messages to LogCat.
-
-
Constructor Summary
Constructors Constructor Description LogCatLogger()
-
Method Summary
Modifier and Type Method Description boolean
isLogged(int priority, @NonNull() String tag)
Override this method to enable or disable logging for log with given priority
andtag
.void
log(int priority, @NonNull() String tag, @NonNull() String message, @Nullable() Throwable throwable)
Implement this method to log messages. void
setEnabled(boolean isEnabled)
Sets whether this logger is enabled. -
-
Method Detail
-
isLogged
boolean isLogged(int priority, @NonNull() String tag)
Override this method to enable or disable logging for log with given
priority
andtag
. By default all log requests are handled.- Parameters:
priority
- The priority of this log message.tag
- Tag to identify the source of this log message.
-
log
void log(int priority, @NonNull() String tag, @NonNull() String message, @Nullable() Throwable throwable)
Implement this method to log messages.
- Parameters:
priority
- The priority of this log message.tag
- Tag to identify the source of this log message.message
- Message that should be logged.throwable
- Optional throwable attached to log message.
-
setEnabled
void setEnabled(boolean isEnabled)
Sets whether this logger is enabled. If enabled, all logs are printed to LogCat. If disabled, all logs are ignored.
- Parameters:
isEnabled
- Prints all logs to LogCat iftrue
, ignores all logs whenfalse
.
-
-
-
-