# SafeLogger

abstract class SafeLogger : Logger

An abstract base class for Logger implementations that safely evaluates the log message lambda. If the lambda throws an exception, it is caught and logged without crashing the application.

#### Inheritors

Slf4jLogger

## Constructors

SafeLogger
Link copied to clipboard
constructor()

## Properties

name
Link copied to clipboard
abstract val name: String

The name of this logger instance.

## Functions

debug
Link copied to clipboard
open fun debug(cause: Throwable? = null, msg: () -> String)

Logs a message at the Level.DEBUG level.

error
Link copied to clipboard
open fun error(cause: Throwable? = null, msg: () -> String)

Logs a message at the Level.ERROR level.

info
Link copied to clipboard
open fun info(cause: Throwable? = null, msg: () -> String)

Logs a message at the Level.INFO level.

log
Link copied to clipboard
open override fun log(level: Level, cause: Throwable?, msg: () -> String)

Logs a message at the specified level.

trace
Link copied to clipboard
open fun trace(cause: Throwable? = null, msg: () -> String)

Logs a message at the Level.TRACE level.

warn
Link copied to clipboard
open fun warn(cause: Throwable? = null, msg: () -> String)

Logs a message at the Level.WARN level.