Skip to content

Core Concepts

Lumber

Lumber is the static-style entry point.

Lumber.info("Ready")

Oak

Lumber.Oak is the extension point for custom logging backends.

class ConsoleOak : Lumber.Oak() {
    override fun isLoggable(tag: String?, level: Lumber.Level) = true

    override fun log(level: Lumber.Level, tag: String?, message: String, error: Throwable?) {
        println("[$level] ${tag ?: "-"} $message")
        error?.printStackTrace()
    }
}

DebugOak

DebugOak is the built-in platform oak.

  • Android routes to android.util.Log
  • JVM prints colored lines to stdout
  • Apple prints colored lines to stdout
  • JS and WasmJS use the native console

One-shot state

These values are consumed after the next log call:

  • tag(...)
  • quiet(...)
  • maxLogLength(...)
  • maxTagLength(...)

That behavior keeps logging state local and predictable.

Forest

Lumber.plant(...), Lumber.uproot(...), and Lumber.uprootAll() manage the active oaks.

Lumber.plant(DebugOak())
Lumber.uprootAll()