UmamiLogger

interface UmamiLogger

A flexible logging interface for recording messages with various severity levels.

This interface provides a standardized API for logging in the Umami library. It supports multiple log levels, from detailed verbose messages to critical errors. Implementations can direct log output to different destinations, such as the console, files, or remote logging services, allowing for adaptable logging strategies depending on the environment (e.g., development, production).

Types

Link copied to clipboard

Represents the severity level of a log message, from least to most critical.

Functions

Link copied to clipboard
open fun debug(message: String)

Logs a debug message, useful for general-purpose debugging and tracing code execution.

Link copied to clipboard
open fun error(message: String, throwable: Throwable? = null)

Logs an error message, indicating a serious issue that may disrupt functionality.

Link copied to clipboard
open fun info(message: String)

Logs an informational message, highlighting high-level application progress.

Link copied to clipboard
abstract fun log(severity: UmamiLogger.Severity, message: String, throwable: Throwable? = null)

The core logging function that all other logging methods delegate to.

Link copied to clipboard
open fun verbose(message: String)

Logs a verbose message, typically for detailed diagnostic information.

Link copied to clipboard
open fun warn(message: String, throwable: Throwable? = null)

Logs a warning message, indicating a potential problem or an unexpected event.