Minimal logger contract used internally by this package. Decouples internals from any specific logging implementation.

The shape is the structural intersection of console and @toreda/log's Log: any object exposing these five level-named methods satisfies it. That includes the global console object, a @toreda/log Log instance, and any custom logger shaped the same way.

Methods take any arguments and the return value is ignored. Implementations that return a Promise (e.g. @toreda/log) are accepted because their return type is assignable to void; fire-and-forget is the only supported usage inside this package — callers must not await results.

Note: log(level, ...args) is intentionally excluded. The signatures of console.log (message-first) and Log.log (level-first) conflict, so a common contract is not safely expressible.

interface LogLike {
    debug(...args): void;
    error(...args): void;
    info(...args): void;
    trace(...args): void;
    warn(...args): void;
}

Methods

  • Parameters

    • Rest ...args: unknown[]

    Returns void

  • Parameters

    • Rest ...args: unknown[]

    Returns void

  • Parameters

    • Rest ...args: unknown[]

    Returns void

  • Parameters

    • Rest ...args: unknown[]

    Returns void

  • Parameters

    • Rest ...args: unknown[]

    Returns void