Utilitiesv0.1.5
@tekir/logger
Structured logger with configurable levels, pretty-print, and field redaction.
Installation
$
bun add @tekir/loggerFeatures
- Log levels: trace, debug, info, warn, error, fatal
- Console transport with pretty-print
- File transport with rotation support
- Pluggable transports (Datadog, Loki, Pino)
- createLogger() factory with config object
Quick Example
TypeScript
import { createLogger, ConsoleTransport } from '@tekir/logger'
const logger = createLogger({
level: 'info',
transports: [new ConsoleTransport()],
})
logger.info('Server started', { port: 3000 })Changelog
v0.1.5LatestSeptember 16, 2026
- Published output now uses the shared Node-targeted ESM bundle pipeline with external dependencies and generated TypeScript declarations, while Bun consumers keep the native source export.
v0.1.4July 23, 2026
- Package metadata now follows the shared compatible
0.1.xdependency range used by this coordinated Tekir release.
v0.1.3July 16, 2026
- Structured fields can no longer forge the selected severity, file transport failures are contained without unhandled rejections, and provider shutdown flushes transports reliably.
v0.1.2June 13, 2026
- Pretty-printed output now strips
CR/LF, tabs, ANSI escapes, and control characters from logged strings, closing a log-injection and terminal-escape surface. - Field redaction is now recursive. Matching keys are redacted at every depth across nested objects, arrays, and the merged context; the caller's object is never mutated and circular references are handled.
- The file transport gained a
maxQueueSize(default 10000, drop-oldest with a dropped-line counter) so a slow disk cannot grow the write queue without bound. - Found and fixed with Fable.
v0.1.0April 1, 2026
- Initial release