Package-level declarations

Types

Link copied to clipboard
interface Logger

An interface for managing logging messages of various LogLevel

Link copied to clipboard

The different levels at which a Logger can log messages.

Link copied to clipboard
class NapierLogger(val logger: Antilog) : Logger

A Logger that uses a NapierLog for actually logging.

Link copied to clipboard
class RestrictedLogger(restrictedLogLevel: RestrictedLogLevel, logger: Logger = defaultLogger) : Logger

A Logger that logs only when the LogLevel is allowed by its RestrictedLogLevel

Link copied to clipboard
sealed class RestrictedLogLevel

A LogLevel that only outputs if a Logger attempts to log with a LogLevel matching the restriction.

Link copied to clipboard
open class TransformLogger(logger: Logger, transformLogLevel: (LogLevel) -> LogLevel? = null, transformTag: (String?) -> String?? = null, transformThrowable: (Throwable?) -> Throwable?? = null, transformMessage: (String?) -> String?? = null) : Logger

A Logger that transforms the logs of a given logger before outputting them.

Properties

Link copied to clipboard
actual val defaultLogger: Logger

The default Logger to be used if no logger is set.

expect val defaultLogger: Logger

The default Logger to be used if no logger is set.

actual val defaultLogger: Logger

The default Logger to be used if no logger is set.

actual val defaultLogger: Logger

The default Logger to be used if no logger is set.

actual val defaultLogger: Logger

The default Logger to be used if no logger is set.

Link copied to clipboard
actual var logger: Logger

The standard Logger to be used when logging.

expect var logger: Logger

The standard Logger to be used when logging.

actual var logger: Logger

The standard Logger to be used when logging.

actual var logger: Logger

The standard Logger to be used when logging.

actual var logger: Logger

The standard Logger to be used when logging.

Functions

Link copied to clipboard
fun d(message: () -> String)
fun d(message: String)

Writes log with DEBUG log level and empty tag.

fun d(throwable: Throwable)

Log exception with DEBUG log level and empty tag.

fun d(tag: String?, message: () -> String)
fun d(tag: String?, message: String)
fun d(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with DEBUG log level and provided tag.

fun d(tag: String? = null, throwable: Throwable)

Log exception with DEBUG log level and provided tag.

Link copied to clipboard
fun Logger.d(message: () -> String)
fun Logger.d(message: String)

Writes log with DEBUG log level and empty tag.

fun Logger.d(throwable: Throwable)

Log exception with DEBUG log level and empty tag.

fun Logger.d(tag: String?, message: () -> String)
fun Logger.d(tag: String?, message: String)
fun Logger.d(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with DEBUG log level and provided tag.

fun Logger.d(tag: String? = null, throwable: Throwable)

Log exception with DEBUG log level and provided tag.

Link copied to clipboard
fun debug(message: () -> String)
fun debug(message: String)

Writes log with DEBUG log level and empty tag.

fun debug(throwable: Throwable)

Log exception with DEBUG log level and empty tag.

fun debug(tag: String?, message: () -> String)
fun debug(tag: String?, message: String)
fun debug(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with DEBUG log level and provided tag.

fun debug(tag: String? = null, throwable: Throwable)

Log exception with DEBUG log level and provided tag.

Link copied to clipboard
fun Logger.debug(message: () -> String)
fun Logger.debug(message: String)

Writes log with DEBUG log level and empty tag.

fun Logger.debug(throwable: Throwable)

Log exception with DEBUG log level and empty tag.

fun Logger.debug(tag: String?, message: () -> String)
fun Logger.debug(tag: String?, message: String)
fun Logger.debug(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with DEBUG log level and provided tag.

fun Logger.debug(tag: String? = null, throwable: Throwable)

Log exception with DEBUG log level and provided tag.

Link copied to clipboard
fun e(message: () -> String)
fun e(message: String)

Writes log with ERROR log level and empty tag.

fun e(throwable: Throwable)

Log exception with ERROR log level and empty tag.

fun e(tag: String?, message: () -> String)
fun e(tag: String?, message: String)
fun e(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with ERROR log level and provided tag.

fun e(tag: String? = null, throwable: Throwable)

Log exception with ERROR log level and provided tag.

Link copied to clipboard
fun Logger.e(message: () -> String)
fun Logger.e(message: String)

Writes log with ERROR log level and empty tag.

fun Logger.e(throwable: Throwable)

Log exception with ERROR log level and empty tag.

fun Logger.e(tag: String?, message: () -> String)
fun Logger.e(tag: String?, message: String)
fun Logger.e(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with ERROR log level and provided tag.

fun Logger.e(tag: String? = null, throwable: Throwable)

Log exception with ERROR log level and provided tag.

Link copied to clipboard
fun error(message: () -> String)
fun error(message: String)

Writes log with ERROR log level and empty tag.

fun error(throwable: Throwable)

Log exception with ERROR log level and empty tag.

fun error(tag: String?, message: () -> String)
fun error(tag: String?, message: String)
fun error(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with ERROR log level and provided tag.

fun error(tag: String? = null, throwable: Throwable)

Log exception with ERROR log level and provided tag.

Link copied to clipboard
fun Logger.error(message: () -> String)
fun Logger.error(message: String)

Writes log with ERROR log level and empty tag.

fun Logger.error(throwable: Throwable)

Log exception with ERROR log level and empty tag.

fun Logger.error(tag: String?, message: () -> String)
fun Logger.error(tag: String?, message: String)
fun Logger.error(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with ERROR log level and provided tag.

fun Logger.error(tag: String? = null, throwable: Throwable)

Log exception with ERROR log level and provided tag.

Link copied to clipboard
fun i(message: () -> String)
fun i(message: String)

Writes log with INFO log level and empty tag.

fun i(throwable: Throwable)

Log exception with INFO log level and empty tag.

fun i(tag: String?, message: () -> String)
fun i(tag: String?, message: String)
fun i(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with INFO log level and provided tag.

fun i(tag: String? = null, throwable: Throwable)

Log exception with INFO log level and provided tag.

Link copied to clipboard
fun Logger.i(message: () -> String)
fun Logger.i(message: String)

Writes log with INFO log level and empty tag.

fun Logger.i(throwable: Throwable)

Log exception with INFO log level and empty tag.

fun Logger.i(tag: String?, message: () -> String)
fun Logger.i(tag: String?, message: String)
fun Logger.i(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with INFO log level and provided tag.

fun Logger.i(tag: String? = null, throwable: Throwable)

Log exception with INFO log level and provided tag.

Link copied to clipboard
fun info(message: () -> String)
fun info(message: String)

Writes log with INFO log level and empty tag.

fun info(throwable: Throwable)

Log exception with INFO log level and empty tag.

fun info(tag: String?, message: () -> String)
fun info(tag: String?, message: String)
fun info(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with INFO log level and provided tag.

fun info(tag: String? = null, throwable: Throwable)

Log exception with INFO log level and provided tag.

Link copied to clipboard
fun Logger.info(message: () -> String)
fun Logger.info(message: String)

Writes log with INFO log level and empty tag.

fun Logger.info(throwable: Throwable)

Log exception with INFO log level and empty tag.

fun Logger.info(tag: String?, message: () -> String)
fun Logger.info(tag: String?, message: String)
fun Logger.info(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with INFO log level and provided tag.

fun Logger.info(tag: String? = null, throwable: Throwable)

Log exception with INFO log level and provided tag.

Link copied to clipboard
fun log(level: LogLevel, tag: String? = null, throwable: Throwable? = null, message: () -> String?)

Writes log with provided level and tag.

Link copied to clipboard

Creates a RestrictedLogLevel by combining the RestrictedLogLevel.levels of two Restricted Log Levels.

Link copied to clipboard

Reset logger to the default

Link copied to clipboard
fun w(message: () -> String)
fun w(message: String)

Writes log with WARN log level and empty tag.

fun w(throwable: Throwable)

Log exception with WARN log level and empty tag.

fun w(tag: String?, message: () -> String)
fun w(tag: String?, message: String)
fun w(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with WARN log level and provided tag.

fun w(tag: String? = null, throwable: Throwable)

Log exception with WARN log level and provided tag.

Link copied to clipboard
fun Logger.w(message: () -> String)
fun Logger.w(message: String)

Writes log with WARN log level and empty tag.

fun Logger.w(throwable: Throwable)

Log exception with WARN log level and empty tag.

fun Logger.w(tag: String?, message: () -> String)
fun Logger.w(tag: String?, message: String)
fun Logger.w(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with WARN log level and provided tag.

fun Logger.w(tag: String? = null, throwable: Throwable)

Log exception with WARN log level and provided tag.

Link copied to clipboard
fun warn(message: () -> String)
fun warn(message: String)

Writes log with WARN log level and empty tag.

fun warn(throwable: Throwable)

Log exception with WARN log level and empty tag.

fun warn(tag: String?, message: () -> String)
fun warn(tag: String?, message: String)
fun warn(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with WARN log level and provided tag.

fun warn(tag: String? = null, throwable: Throwable)

Log exception with WARN log level and provided tag.

Link copied to clipboard
fun Logger.warn(message: () -> String)
fun Logger.warn(message: String)

Writes log with WARN log level and empty tag.

fun Logger.warn(throwable: Throwable)

Log exception with WARN log level and empty tag.

fun Logger.warn(tag: String?, message: () -> String)
fun Logger.warn(tag: String?, message: String)
fun Logger.warn(tag: String? = null, throwable: Throwable? = null, message: () -> String)

Writes log with WARN log level and provided tag.

fun Logger.warn(tag: String? = null, throwable: Throwable)

Log exception with WARN log level and provided tag.

Link copied to clipboard
fun wrapLogger(wrapper: (Logger) -> Logger)

Wraps logger with a wrapper method