ts-log provides a minimal TypeScript Logger interface and a no-op dummyLogger that implements it, allowing libraries to accept a logger dependency without forcing one. Version 3.0.2 (latest stable) requires Node >=20 and ships both ESM and CJS modules. It has zero runtime dependencies and is designed to be compatible with console, pino, bunyan, winston, and any object matching the five-method shape (trace, debug, info, warn, error). Releases are infrequent but stable, focused on maintaining the minimal API. Key differentiator: lightweight, typed, and library-friendly with no overhead.
npm install ts-logNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to accept a Logger dependency with a no-op default and use it in a class.
Upgrade to Node.js >=20 and use named ESM imports.
Update import paths or migrate to v3 with new structure.
Test with a real logger to verify log output is as expected.
Use a full-featured logger like pino if you need child loggers or log levels beyond the five basic ones.
Run `npm install ts-log` and ensure Node.js >=20 (or use ts-log v2 for older Node.js).
Upgrade to ts-log >=2.0.0 which exports dummyLogger.
No dependency data recorded yet.