Logger

interface Logger

An interface representing a logger that can be used to log messages. It provides methods for logging messages with different log levels. Each method takes a tag and a lambda function returning a message as parameters to avoid unnecessary String concatenation.

Functions

Link copied to clipboard
abstract fun assert(tag: String, message: () -> String)

Logs the message with the LogLevel.ASSERT level and the specified tag.

Link copied to clipboard
abstract fun debug(tag: String, message: () -> String)

Logs the message with the LogLevel.DEBUG level and the specified tag.

Link copied to clipboard
abstract fun error(tag: String, message: () -> String)

Logs the message with the LogLevel.ERROR level and the specified tag.

Link copied to clipboard
abstract fun info(tag: String, message: () -> String)

Logs the message with the LogLevel.INFO level and the specified tag.

Link copied to clipboard
abstract fun log(level: LogLevel, tag: String, message: () -> String)

Logs the message with the specified level and tag.

Link copied to clipboard
abstract fun verbose(tag: String, message: () -> String)

Logs the message with the LogLevel.VERBOSE level and the specified tag.

Link copied to clipboard
abstract fun warn(tag: String, message: () -> String)

Logs the message with the LogLevel.WARN level and the specified tag.