Logger

interface Logger

Structured logging interface for KioskOps SDK.

Provides level-based logging with optional structured fields for enhanced searchability and correlation.

Security (BSI SYS.3.2.2.A12): All log methods support structured fields to enable consistent audit trail format.

Privacy (GDPR Art. 5): Callers are responsible for not including PII in log messages or fields. Use field filtering if needed.

Usage:

logger.i("SyncEngine", "Sync completed", mapOf(
"events_sent" to "42",
"duration_ms" to "150",
))

Since

0.4.0

Inheritors

Functions

Link copied to clipboard
abstract fun d(tag: String, message: String, fields: Map<String, String> = emptyMap())

Log a debug message. Use for development-time debugging.

Link copied to clipboard
abstract fun e(tag: String, message: String, throwable: Throwable? = null, fields: Map<String, String> = emptyMap())

Log an error message. Use for error conditions that should be investigated.

Link copied to clipboard
abstract fun i(tag: String, message: String, fields: Map<String, String> = emptyMap())

Log an info message. Use for general operational information.

Link copied to clipboard
abstract fun isEnabled(level: LogLevel): Boolean

Check if logging is enabled at the given level. Use to avoid expensive string formatting when logging is disabled.

Link copied to clipboard
abstract fun log(level: LogLevel, tag: String, message: String, throwable: Throwable? = null, fields: Map<String, String> = emptyMap())

Log a message at the specified level.

Link copied to clipboard
abstract fun v(tag: String, message: String, fields: Map<String, String> = emptyMap())

Log a verbose message. Use for detailed debugging information.

Link copied to clipboard
abstract fun w(tag: String, message: String, throwable: Throwable? = null, fields: Map<String, String> = emptyMap())

Log a warning message. Use for potentially problematic situations.