Logger

fun interface Logger

Interface for custom loggers that can be registered in PdfLog to implement custom logging strategies.

A fun interface so Kotlin callers can register one with a lambda (SAM conversion) — the single abstract method is log; isLogged has a default. This matches how the previous Java interface behaved as a functional interface.

Inheritors

Functions

Link copied to clipboard
open fun isLogged(priority: Int, tag: String): Boolean

Override this method to enable or disable logging for log with given priority and tag. By default all log requests are handled.

Link copied to clipboard
abstract fun log(priority: Int, tag: String, message: String, throwable: Throwable?)

Implement this method to log messages.