Minimal Logger interface for the functype ecosystem.
One shared contract every present and future sibling package can reference
without inventing its own ad-hoc logger interface. Type-only — no runtime,
no opinion on output format, no console-global dependency. Default impls
live in consumer packages (e.g. consoleBootLogger in functype-os/config).
Four methods, all mandatory: debug, info, warn, error. Mandatory
means no defensive logger.debug?.() checks at call sites.
Richer loggers — DirectLogger from functype-log/direct for example —
structurally satisfy Logger because their debug/info/warn/error(msg, meta?)
signatures are a superset. Pass them directly anywhere a Logger is
expected; no adapter required.
Minimal Logger interface for the functype ecosystem.
One shared contract every present and future sibling package can reference without inventing its own ad-hoc logger interface. Type-only — no runtime, no opinion on output format, no
console-global dependency. Default impls live in consumer packages (e.g.consoleBootLoggerinfunctype-os/config).Four methods, all mandatory:
debug,info,warn,error. Mandatory means no defensivelogger.debug?.()checks at call sites.Richer loggers —
DirectLoggerfromfunctype-log/directfor example — structurally satisfyLoggerbecause theirdebug/info/warn/error(msg, meta?)signatures are a superset. Pass them directly anywhere aLoggeris expected; no adapter required.