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/logLog 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.
Minimal logger contract used internally by this package. Decouples internals from any specific logging implementation.
The shape is the structural intersection of
consoleand@toreda/log'sLog: any object exposing these five level-named methods satisfies it. That includes the globalconsoleobject, a@toreda/logLoginstance, 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 tovoid; 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 ofconsole.log(message-first) andLog.log(level-first) conflict, so a common contract is not safely expressible.