AbstractLogger

abstract class AbstractLogger : Logger

An abstract implementation of a logger. This class delegates the trace, debug, info, warn, and error methods to a centralized log method which accepts LogLevel as a parameter. By default, this class uses no-op implementations for all other members unless overridden in a subclass.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun atLevel(level: LogLevel): LogRecordBuilder

Create a new log record using the returned LogRecordBuilder

Link copied to clipboard
open override fun debug(t: Throwable?, msg: MessageSupplier)

Lazy add a log message with throwable payload if debug logging is enabled

Link copied to clipboard
open override fun error(t: Throwable?, msg: MessageSupplier)

Lazy add a log message with throwable payload if error logging is enabled

Link copied to clipboard
open override fun info(t: Throwable?, msg: MessageSupplier)

Lazy add a log message with throwable payload if info logging is enabled

Link copied to clipboard
open override fun isEnabledFor(level: LogLevel): Boolean

Test if this logger is enabled for level

Link copied to clipboard
open fun log(level: LogLevel, t: Throwable?, msg: MessageSupplier)
Link copied to clipboard
open override fun trace(t: Throwable?, msg: MessageSupplier)

Lazy add a log message with throwable payload if trace logging is enabled

Link copied to clipboard
open override fun warn(t: Throwable?, msg: MessageSupplier)

Lazy add a log message with throwable payload if warn logging is enabled

Inherited functions

Link copied to clipboard
fun Logger.debug(msg: String)

Add a log message if debug logging is enabled

Link copied to clipboard
fun Logger.error(msg: String)

Add a log message if error logging is enabled

Link copied to clipboard
fun Logger.info(msg: String)

Add a log message if info logging is enabled

Link copied to clipboard
fun Logger.trace(msg: String)

Add a log message if trace logging is enabled

Link copied to clipboard
fun Logger.warn(msg: String)

Add a log message if warn logging is enabled