PdfLog

class PdfLog

Logger used for logging inside PSPDFKit.

This API allows injection of custom Logger implementations that can be used to achieve custom logging strategies for PSPDFKit framework logs.

Note: The default Logger only logs messages with priority Log#INFO or higher to LogCat.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
interface Logger
Interface for custom loggers that can be registered in PdfLog to implement custom logging strategies.
Link copied to clipboard
annotation class LogPriority
Priority of log messages.

Functions

Link copied to clipboard
open fun addLogger(@NonNull logger: PdfLog.Logger)
Adds new logger that will be notified of all logs emitted by PdfLog.
Link copied to clipboard
open fun d(@NonNull tag: String, @NonNull messageCallback: Callable<String>)
open fun d(@NonNull tag: String, @Nullable message: String, @NonNull args: Array<Any>)
open fun d(@NonNull tag: String, @Nullable t: Throwable, @Nullable message: String, @NonNull args: Array<Any>)
Logs a DEBUG log message.
Link copied to clipboard
open fun e(@NonNull tag: String, @NonNull messageCallback: Callable<String>)
open fun e(@NonNull tag: String, @Nullable message: String, @NonNull args: Array<Any>)
open fun e(@NonNull tag: String, @Nullable t: Throwable, @Nullable message: String, @NonNull args: Array<Any>)
Logs a ERROR log message.
Link copied to clipboard
Returns loggers that are currently registered.
Link copied to clipboard
open fun i(@NonNull tag: String, @NonNull messageCallback: Callable<String>)
open fun i(@NonNull tag: String, @Nullable message: String, @NonNull args: Array<Any>)
open fun i(@NonNull tag: String, @Nullable t: Throwable, @Nullable message: String, @NonNull args: Array<Any>)
Logs a INFO log message.
Link copied to clipboard
open fun removeAllLoggers()
Removes all registered loggers.
Link copied to clipboard
open fun removeLogger(@NonNull logger: PdfLog.Logger)
Removes previously registered logger.
Link copied to clipboard
open fun setLoggers(@NonNull loggers: Array<PdfLog.Logger>)
open fun setLoggers(@NonNull loggers: Collection<out PdfLog.Logger>)
Sets loggers that will be notified of all logs emitted by PdfLog.
Link copied to clipboard
open fun v(@NonNull tag: String, @NonNull messageCallback: Callable<String>)
open fun v(@NonNull tag: String, @Nullable message: String, @NonNull args: Array<Any>)
open fun v(@NonNull tag: String, @Nullable t: Throwable, @Nullable message: String, @NonNull args: Array<Any>)
Logs a VERBOSE log message.
Link copied to clipboard
open fun w(@NonNull tag: String, @NonNull messageCallback: Callable<String>)
open fun w(@NonNull tag: String, @Nullable message: String, @NonNull args: Array<Any>)
open fun w(@NonNull tag: String, @Nullable t: Throwable, @Nullable message: String, @NonNull args: Array<Any>)
Logs a WARN log message.