LoggerNoop

A Logger instance that prevents all logging.

Functions

Link copied to clipboard
fun Logger.debug(message: String, throwable: Throwable? = null)

Calls Logger.log message with Debug level.

Link copied to clipboard
inline fun <T> Logger.duration(body: () -> T): T

Measures the duration it takes to invoke the body. Logs with Verbose level message Started before the invocation and Finished took XYZms after completion.

Link copied to clipboard
fun Logger.error(message: String, throwable: Throwable? = null)

Calls Logger.log message with Error level.

Link copied to clipboard
fun Logger.info(message: String, throwable: Throwable? = null)

Calls Logger.log message with Info level.

Link copied to clipboard
open override fun log(level: Level, message: String, throwable: Throwable?)

Uses level to determine whether it should be passed to the underlying implementation. Implementations are free to use whichever level they like.

Link copied to clipboard
fun Logger.verbose(message: String, throwable: Throwable? = null)

Calls Logger.log message with Verbose level.

Link copied to clipboard
fun Logger.warning(message: String, throwable: Throwable? = null)

Calls Logger.log message with Warning level.