Logger

class Logger

Utility to log messages.

In order to set loggers at runtime. Set environment variables:

LOG_$loggerName=debug

For setting the default log level to something else:

LOG_LEVEL=debug

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Default Output to emit logs over the Console

Link copied to clipboard

Logging Level

Link copied to clipboard
interface Output

Logging Output to handle logs

Properties

Link copied to clipboard
Link copied to clipboard

Returns if this Logger has at least level Level.DEBUG

Link copied to clipboard

Returns if this Logger has at least level Level.ERROR

Link copied to clipboard

Returns if this Logger has at least level Level.FATAL

Link copied to clipboard

Returns if this Logger has at least level Level.INFO

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns if this Logger has at least level Level.TRACE

Link copied to clipboard

Returns if this Logger has at least level Level.WARN

Link copied to clipboard

Level of this Logger. If not set, it will use the Logger.defaultLevel

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Output of this Logger. If not set, it will use the Logger.defaultOutput

Functions

Link copied to clipboard
inline fun debug(msg: () -> Any?)

Traces the lazily executed msg if the Logger.level is at least Level.DEBUG

Link copied to clipboard
inline fun error(msg: () -> Any?)

Traces the lazily executed msg if the Logger.level is at least Level.ERROR

Link copied to clipboard
inline fun fatal(msg: () -> Any?)

Traces the lazily executed msg if the Logger.level is at least Level.FATAL

Link copied to clipboard
inline fun info(msg: () -> Any?)

Traces the lazily executed msg if the Logger.level is at least Level.INFO

Link copied to clipboard

Returns if this Logger has at least level Level

Link copied to clipboard
inline fun log(level: Logger.Level, msg: () -> Any?)

Traces the lazily executed msg if the Logger.level is at least level

Link copied to clipboard
inline fun <T> logTime(name: String, level: Logger.Level = Level.INFO, block: () -> T): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun trace(msg: () -> Any?)

Traces the lazily executed msg if the Logger.level is at least Level.TRACE

Link copied to clipboard
inline fun warn(msg: () -> Any?)

Traces the lazily executed msg if the Logger.level is at least Level.WARN