semanticlogger / de.roamingthings.semanticlogger / SemanticLogger

SemanticLogger

class SemanticLogger

Semantic Logger.

This class wraps a org.slf4j.Logger and converts its log levels debug, info, warn and error in methods with semantic names:

debug() -> forTestPurpose()

info() -> asExpectedByDefault()

warn() -> toInvestigateTomorrow()

error() -> wakeMeUpInTheMiddleOfTheNight()

The method signatures are equal to the delegated methods.

Author
Alexander Sparkowsky

Functions

asExpectedByDefault

Generate a logging message with info level.

fun asExpectedByDefault(message: String): Unit

Generate a logging message with level of info using the delegate logger.

fun asExpectedByDefault(format: String, arg: Any): Unit
fun asExpectedByDefault(format: String, arg1: Any, arg2: Any): Unit
fun asExpectedByDefault(format: String, vararg arguments: Any): Unit
fun asExpectedByDefault(msg: String, t: Throwable): Unit

forTestPurpose

Generate a logging message with debug level.

fun forTestPurpose(message: String): Unit

Generate a logging message with level of debug using the delegate logger.

fun forTestPurpose(format: String, arg: Any): Unit
fun forTestPurpose(format: String, arg1: Any, arg2: Any): Unit
fun forTestPurpose(format: String, vararg arguments: Any): Unit
fun forTestPurpose(msg: String, t: Throwable): Unit

remindToRemoveUnusedImplementationAfter

Generate a logging event with the level error if the current date/time is after the date in deadlineDateInIsoFormat.

fun remindToRemoveUnusedImplementationAfter(deadlineDateInIsoFormat: String, message: String): Unit

toInvestigateTomorrow

Generate a logging message with warn level.

fun toInvestigateTomorrow(message: String): Unit

Generate a logging message with level of warn using the delegate logger.

fun toInvestigateTomorrow(format: String, arg: Any): Unit
fun toInvestigateTomorrow(format: String, arg1: Any, arg2: Any): Unit
fun toInvestigateTomorrow(format: String, vararg arguments: Any): Unit
fun toInvestigateTomorrow(msg: String, t: Throwable): Unit

wakeMeUpInTheMiddleOfTheNight

Generate a logging message with error level.

fun wakeMeUpInTheMiddleOfTheNight(message: String): Unit

Generate a logging message with level of error using the delegate logger.

fun wakeMeUpInTheMiddleOfTheNight(format: String, arg: Any): Unit
fun wakeMeUpInTheMiddleOfTheNight(format: String, arg1: Any, arg2: Any): Unit
fun wakeMeUpInTheMiddleOfTheNight(format: String, vararg arguments: Any): Unit
fun wakeMeUpInTheMiddleOfTheNight(msg: String, t: Throwable): Unit