Slf4jLogger

abstract class Slf4jLogger<T> : KLogger, DelegatingKLogger<T>

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val name: String

Return the name of this Logger instance.

Link copied to clipboard
abstract val underlyingLogger: T

The actual logger executing logging

Functions

Link copied to clipboard
abstract fun at(level: Level, marker: Marker? = null, block: KLoggingEventBuilder.() -> Unit)

Lazy add a log message if level enabled

Link copied to clipboard
open fun atDebug(block: KLoggingEventBuilder.() -> Unit)
open fun atDebug(marker: Marker?, block: KLoggingEventBuilder.() -> Unit)

Lazy add a log message with throwable payload if isDebugEnabled is true

Link copied to clipboard
open fun atError(block: KLoggingEventBuilder.() -> Unit)
open fun atError(marker: Marker?, block: KLoggingEventBuilder.() -> Unit)

Lazy add a log message with throwable payload if isErrorEnabled is true

Link copied to clipboard
open fun atInfo(block: KLoggingEventBuilder.() -> Unit)
open fun atInfo(marker: Marker?, block: KLoggingEventBuilder.() -> Unit)

Lazy add a log message with throwable payload if isInfoEnabled is true

Link copied to clipboard
open fun atTrace(block: KLoggingEventBuilder.() -> Unit)
open fun atTrace(marker: Marker?, block: KLoggingEventBuilder.() -> Unit)

Lazy add a log message with throwable payload if isTraceEnabled is true

Link copied to clipboard
open fun atWarn(block: KLoggingEventBuilder.() -> Unit)
open fun atWarn(marker: Marker?, block: KLoggingEventBuilder.() -> Unit)

Lazy add a log message with throwable payload if isWarnEnabled is true

Link copied to clipboard
open fun <T : Throwable> catching(throwable: T)

Add a log message indicating an exception is caught along with the stack trace.

Link copied to clipboard
open fun debug(message: () -> Any?)
open fun debug(throwable: Throwable?, message: () -> Any?)

Lazy add a log message if isDebugEnabled is true

open fun debug(marker: Marker?, message: () -> Any?)

Lazy add a log message with a marker if isDebugEnabled is true

open fun debug(marker: Marker?, throwable: Throwable?, message: () -> Any?)

Lazy add a log message with a marker and throwable if isDebugEnabled is true

Link copied to clipboard
open fun entry(vararg arguments: Any?)

Add a log message with all the supplied parameters along with method name

Link copied to clipboard
open fun error(message: () -> Any?)
open fun error(throwable: Throwable?, message: () -> Any?)

Lazy add a log message if isErrorEnabled is true

open fun error(marker: Marker?, message: () -> Any?)

Lazy add a log message with a marker if isErrorEnabled is true

open fun error(marker: Marker?, throwable: Throwable?, message: () -> Any?)

Lazy add a log message with a marker and throwable if isErrorEnabled is true

Link copied to clipboard
open fun exit()

Add log message indicating exit of a method

open fun <T> exit(result: T): T

Add a log message with the return value of a method

Link copied to clipboard
open fun info(message: () -> Any?)
open fun info(throwable: Throwable?, message: () -> Any?)

Lazy add a log message if isInfoEnabled is true

open fun info(marker: Marker?, message: () -> Any?)

Lazy add a log message with a marker if isInfoEnabled is true

open fun info(marker: Marker?, throwable: Throwable?, message: () -> Any?)

Lazy add a log message with a marker and throwable if isInfoEnabled is true

Link copied to clipboard
open fun isDebugEnabled(marker: Marker? = null): Boolean

Similar to .isDebugEnabled method except that the marker data is also taken into account.

Link copied to clipboard
open fun isErrorEnabled(marker: Marker? = null): Boolean

Similar to .isErrorEnabled method except that the marker data is also taken into consideration.

Link copied to clipboard
open fun isInfoEnabled(marker: Marker? = null): Boolean

Similar to .isInfoEnabled method except that the marker data is also taken into consideration.

Link copied to clipboard
abstract fun isLoggingEnabledFor(level: Level, marker: Marker? = null): Boolean

Check if the logger is enabled for the specified level

Link copied to clipboard
open fun isLoggingOff(marker: Marker? = null): Boolean

Similar to .isLoggingOff method except that the marker data is also taken into consideration.

Link copied to clipboard
open fun isTraceEnabled(marker: Marker? = null): Boolean

Similar to .isTraceEnabled method except that the marker data is also taken into account.

Link copied to clipboard
open fun isWarnEnabled(marker: Marker? = null): Boolean

Similar to .isWarnEnabled method except that the marker data is also taken into consideration.

Link copied to clipboard
open fun <T : Throwable> throwing(throwable: T): T

Add a log message indicating an exception will be thrown along with the stack trace.

Link copied to clipboard
open fun trace(message: () -> Any?)
open fun trace(throwable: Throwable?, message: () -> Any?)

Lazy add a log message if isTraceEnabled is true

open fun trace(marker: Marker?, message: () -> Any?)

Lazy add a log message with a marker if isTraceEnabled is true

open fun trace(marker: Marker?, throwable: Throwable?, message: () -> Any?)

Lazy add a log message with a marker and throwable if isTraceEnabled is true

Link copied to clipboard
open fun warn(message: () -> Any?)
open fun warn(throwable: Throwable?, message: () -> Any?)

Lazy add a log message if isWarnEnabled is true

open fun warn(marker: Marker?, message: () -> Any?)

Lazy add a log message with a marker if isWarnEnabled is true

open fun warn(marker: Marker?, throwable: Throwable?, message: () -> Any?)

Lazy add a log message with a marker and throwable if isWarnEnabled is true