//Lumber/br.com.arch.toolkit.lumber/DebugOak
expect open class DebugOak : Lumber.Oakactual open class DebugOak : Lumber.Oakactual open class DebugOak : Lumber.Oakactual open class DebugOak : Lumber.Oakactual open class DebugOak : Lumber.Oakactual open class DebugOak : Lumber.Oak
A platform-specific implementation of Lumber.Oak designed for development logging.
DebugOak provides a sensible default for each target platform, using the standard logging mechanisms available (e.g., Logcat on Android, console on JS/Wasm, and colored println on JVM and Apple platforms).
android.util.Log.console object.Lumber.plant(DebugOak())
Android-specific implementation of Lumber.Oak, delegating logs to the Android’s Log framework.
This is conceptually similar to Timber’s DebugOak: it prints all logs to Logcat, mapping Lumber.Level to the corresponding Android priority.
// Plant the DebugOak for Android
Lumber.plant(DebugOak())
Lumber.debug("Debug message with id=%d", 42)
Lumber.error(Exception("Oops"), "Something went wrong")
The Apple-specific implementation of DebugOak (iOS, macOS, etc.) that logs messages to the standard output using println with ANSI color coding.
Each log level is assigned a distinct color for better visibility in the Xcode console or terminal:
This implementation maps each Lumber.Level to a specific style via ColoredLog.
The JavaScript-specific implementation of DebugOak, which delegates all log messages to the native console object.
It maps each Lumber.Level to the most appropriate console method:
console.logconsole.logconsole.infoconsole.warnconsole.errorconsole.errorThe output includes the level name and the tag to provide context within the browser or Node.js console.
The JVM-specific implementation of DebugOak that logs messages to the standard output (stdout) with ANSI color coding.
Each log level is assigned a distinct color to improve readability in terminal environments:
This implementation is ideal for server-side or desktop applications where console output is the primary means of debugging.
The WasmJS-specific implementation of DebugOak, which delegates all log messages to the native JavaScript console object via helper functions.
It maps each Lumber.Level to the most appropriate console method:
console.logconsole.logconsole.infoconsole.warnconsole.errorconsole.errorThe output includes the level name and the tag to provide context within the browser or Node.js console.
| Lumber.Oak |
| Lumber.Oak |
| DebugOak | [common] expect constructor() [android, apple, jvm] constructor() [js, wasmJs] actual constructor() |
| Name | Summary |
|---|---|
| debug | [common, android] [common, android] open fun debug(error: Throwable) Logs a Debug error. [apple, js, jvm, wasmJs] [apple] open fun debug(error: Throwable) [js] open fun debug(error: Throwable) [jvm] open fun debug(error: Throwable) [wasmJs] open fun debug(error: Throwable) Logs a Debug error. [common, android] [common, android] open fun debug(message: String, vararg args: Any?) Logs a Debug message. [apple, js, jvm, wasmJs] [apple] open fun debug(message: String, vararg args: Any?) [js] open fun debug(message: String, vararg args: Any?) [jvm] open fun debug(message: String, vararg args: Any?) [wasmJs] open fun debug(message: String, vararg args: Any?) Logs a Debug message. [common, android] [common, android] open fun debug(error: Throwable, message: String, vararg args: Any?) Logs a Debug error with a message. [apple, js, jvm, wasmJs] [apple] open fun debug(error: Throwable, message: String, vararg args: Any?) [js] open fun debug(error: Throwable, message: String, vararg args: Any?) [jvm] open fun debug(error: Throwable, message: String, vararg args: Any?) [wasmJs] open fun debug(error: Throwable, message: String, vararg args: Any?) Logs a Debug error with a message. |
| error | [common, android] [common, android] open fun error(error: Throwable) Logs an Error error. [apple, js, jvm, wasmJs] [apple] open fun error(error: Throwable) [js] open fun error(error: Throwable) [jvm] open fun error(error: Throwable) [wasmJs] open fun error(error: Throwable) Logs an Error error. [common, android] [common, android] open fun error(message: String, vararg args: Any?) Logs an Error message. [apple, js, jvm, wasmJs] [apple] open fun error(message: String, vararg args: Any?) [js] open fun error(message: String, vararg args: Any?) [jvm] open fun error(message: String, vararg args: Any?) [wasmJs] open fun error(message: String, vararg args: Any?) Logs an Error message. [common, android] [common, android] open fun error(error: Throwable, message: String, vararg args: Any?) Logs an Error error with a message. [apple, js, jvm, wasmJs] [apple] open fun error(error: Throwable, message: String, vararg args: Any?) [js] open fun error(error: Throwable, message: String, vararg args: Any?) [jvm] open fun error(error: Throwable, message: String, vararg args: Any?) [wasmJs] open fun error(error: Throwable, message: String, vararg args: Any?) Logs an Error error with a message. |
| info | [common, android] [common, android] open fun info(error: Throwable) Logs an Info error. [apple, js, jvm, wasmJs] [apple] open fun info(error: Throwable) [js] open fun info(error: Throwable) [jvm] open fun info(error: Throwable) [wasmJs] open fun info(error: Throwable) Logs an Info error. [common, android] [common, android] open fun info(message: String, vararg args: Any?) Logs an Info message. [apple, js, jvm, wasmJs] [apple] open fun info(message: String, vararg args: Any?) [js] open fun info(message: String, vararg args: Any?) [jvm] open fun info(message: String, vararg args: Any?) [wasmJs] open fun info(message: String, vararg args: Any?) Logs an Info message. [common, android] [common, android] open fun info(error: Throwable, message: String, vararg args: Any?) Logs an Info error with a message. [apple, js, jvm, wasmJs] [apple] open fun info(error: Throwable, message: String, vararg args: Any?) [js] open fun info(error: Throwable, message: String, vararg args: Any?) [jvm] open fun info(error: Throwable, message: String, vararg args: Any?) [wasmJs] open fun info(error: Throwable, message: String, vararg args: Any?) Logs an Info error with a message. |
| isLoggable | [common] expect open override fun isLoggable(tag: String?, level: Lumber.Level): Boolean Determines whether a log message should be output. [android] actual open override fun isLoggable(tag: String?, level: Lumber.Level): Boolean Determines whether a log at the given level should be printed.[apple] actual open override fun isLoggable(tag: String?, level: Lumber.Level): Boolean For Apple platforms, all log levels are considered loggable by default. [js] actual open override fun isLoggable(tag: String?, level: Lumber.Level): Boolean For JS, all log levels are considered loggable by default. [jvm] actual open override fun isLoggable(tag: String?, level: Lumber.Level): Boolean For the JVM implementation, all log levels are considered loggable by default. [wasmJs] actual open override fun isLoggable(tag: String?, level: Lumber.Level): Boolean For WasmJS, all log levels are considered loggable by default. |
| log | [common, android] [common, android] open fun log(level: Lumber.Level, error: Throwable) Logs an error with a specific Level. [apple, js, jvm, wasmJs] [apple] open fun log(level: Lumber.Level, error: Throwable) [js] open fun log(level: Lumber.Level, error: Throwable) [jvm] open fun log(level: Lumber.Level, error: Throwable) [wasmJs] open fun log(level: Lumber.Level, error: Throwable) Logs an error with a specific Level. [common, android] [common, android] open fun log(level: Lumber.Level, message: String, vararg args: Any?) Logs a message with a specific Level and optional arguments. [apple, js, jvm, wasmJs] [apple] open fun log(level: Lumber.Level, message: String, vararg args: Any?) [js] open fun log(level: Lumber.Level, message: String, vararg args: Any?) [jvm] open fun log(level: Lumber.Level, message: String, vararg args: Any?) [wasmJs] open fun log(level: Lumber.Level, message: String, vararg args: Any?) Logs a message with a specific Level and optional arguments. [common, android, apple, js, jvm, wasmJs] [common, android] open fun log(level: Lumber.Level, error: Throwable?, message: String?, vararg args: Any?) [apple] open fun log(level: Lumber.Level, error: Throwable?, message: String?, vararg args: Any?) [js] open fun log(level: Lumber.Level, error: Throwable?, message: String?, vararg args: Any?) [jvm] open fun log(level: Lumber.Level, error: Throwable?, message: String?, vararg args: Any?) [wasmJs] open fun log(level: Lumber.Level, error: Throwable?, message: String?, vararg args: Any?) The most generic log method, handling all parameters. |
| maxLogLength | [common, android, apple, js, jvm, wasmJs] [common, android] open fun maxLogLength(length: Int): Lumber.Oak [apple] open fun maxLogLength(length: Int): Lumber.Oak [js] open fun maxLogLength(length: Int): Lumber.Oak [jvm] open fun maxLogLength(length: Int): Lumber.Oak [wasmJs] open fun maxLogLength(length: Int): Lumber.Oak Sets a one-time maximum length for the next log message. |
| maxTagLength | [common, android, apple, js, jvm, wasmJs] [common, android] open fun maxTagLength(length: Int): Lumber.Oak [apple] open fun maxTagLength(length: Int): Lumber.Oak [js] open fun maxTagLength(length: Int): Lumber.Oak [jvm] open fun maxTagLength(length: Int): Lumber.Oak [wasmJs] open fun maxTagLength(length: Int): Lumber.Oak Sets a one-time maximum length for the tag on the next log message. |
| quiet | [common, android, apple, js, jvm, wasmJs] [common, android] open fun quiet(quiet: Boolean): Lumber.Oak [apple] open fun quiet(quiet: Boolean): Lumber.Oak [js] open fun quiet(quiet: Boolean): Lumber.Oak [jvm] open fun quiet(quiet: Boolean): Lumber.Oak [wasmJs] open fun quiet(quiet: Boolean): Lumber.Oak Suppresses the next log message for this Oak. |
| tag | [common, android, apple, js, jvm, wasmJs] [common, android] open fun tag(tag: String): Lumber.Oak [apple] open fun tag(tag: String): Lumber.Oak [js] open fun tag(tag: String): Lumber.Oak [jvm] open fun tag(tag: String): Lumber.Oak [wasmJs] open fun tag(tag: String): Lumber.Oak Sets a one-time tag for the next log message. |
| verbose | [common, android] [common, android] open fun verbose(error: Throwable) Logs a Verbose error. [apple, js, jvm, wasmJs] [apple] open fun verbose(error: Throwable) [js] open fun verbose(error: Throwable) [jvm] open fun verbose(error: Throwable) [wasmJs] open fun verbose(error: Throwable) Logs a Verbose error. [common, android] [common, android] open fun verbose(message: String, vararg args: Any?) Logs a Verbose message. [apple, js, jvm, wasmJs] [apple] open fun verbose(message: String, vararg args: Any?) [js] open fun verbose(message: String, vararg args: Any?) [jvm] open fun verbose(message: String, vararg args: Any?) [wasmJs] open fun verbose(message: String, vararg args: Any?) Logs a Verbose message. [common, android] [common, android] open fun verbose(error: Throwable, message: String, vararg args: Any?) Logs a Verbose error with a message. [apple, js, jvm, wasmJs] [apple] open fun verbose(error: Throwable, message: String, vararg args: Any?) [js] open fun verbose(error: Throwable, message: String, vararg args: Any?) [jvm] open fun verbose(error: Throwable, message: String, vararg args: Any?) [wasmJs] open fun verbose(error: Throwable, message: String, vararg args: Any?) Logs a Verbose error with a message. |
| warn | [common, android] [common, android] open fun warn(error: Throwable) Logs a Warn error. [apple, js, jvm, wasmJs] [apple] open fun warn(error: Throwable) [js] open fun warn(error: Throwable) [jvm] open fun warn(error: Throwable) [wasmJs] open fun warn(error: Throwable) Logs a Warn error. [common, android] [common, android] open fun warn(message: String, vararg args: Any?) Logs a Warn message. [apple, js, jvm, wasmJs] [apple] open fun warn(message: String, vararg args: Any?) [js] open fun warn(message: String, vararg args: Any?) [jvm] open fun warn(message: String, vararg args: Any?) [wasmJs] open fun warn(message: String, vararg args: Any?) Logs a Warn message. [common, android] [common, android] open fun warn(error: Throwable, message: String, vararg args: Any?) Logs a Warn error with a message. [apple, js, jvm, wasmJs] [apple] open fun warn(error: Throwable, message: String, vararg args: Any?) [js] open fun warn(error: Throwable, message: String, vararg args: Any?) [jvm] open fun warn(error: Throwable, message: String, vararg args: Any?) [wasmJs] open fun warn(error: Throwable, message: String, vararg args: Any?) Logs a Warn error with a message. |
| wtf | [common, android] [common, android] open fun wtf(error: Throwable) Logs an Assert error. [apple, js, jvm, wasmJs] [apple] open fun wtf(error: Throwable) [js] open fun wtf(error: Throwable) [jvm] open fun wtf(error: Throwable) [wasmJs] open fun wtf(error: Throwable) Logs an Assert error. [common, android] [common, android] open fun wtf(message: String, vararg args: Any?) Logs an Assert message. [apple, js, jvm, wasmJs] [apple] open fun wtf(message: String, vararg args: Any?) [js] open fun wtf(message: String, vararg args: Any?) [jvm] open fun wtf(message: String, vararg args: Any?) [wasmJs] open fun wtf(message: String, vararg args: Any?) Logs an Assert message. [common, android] [common, android] open fun wtf(error: Throwable, message: String, vararg args: Any?) Logs an Assert error with a message. [apple, js, jvm, wasmJs] [apple] open fun wtf(error: Throwable, message: String, vararg args: Any?) [js] open fun wtf(error: Throwable, message: String, vararg args: Any?) [jvm] open fun wtf(error: Throwable, message: String, vararg args: Any?) [wasmJs] open fun wtf(error: Throwable, message: String, vararg args: Any?) Logs an Assert error with a message. |