Examples
Run examples from the packages/logger directory:
pnpm run example:basicpnpm run example:structuredpnpm run example:writer-prettypnpm run example:contextpnpm run example:processorpnpm run example:memorypnpm run example:compositepnpm run example:formatterpnpm run example:printfpnpm run example:linepnpm run example:workerExample Files
Section titled “Example Files”basic.ts: named console logger with pretty output.structured.ts: JSON output and structured metadata.writer-pretty.ts: pretty output written to stderr withWriterTransport.context.ts: inherited metadata with child loggers.processor.ts: redaction and enrichment with a processor.memory.ts: capture logs in memory.composite-transport.ts: write one record to multiple transports.custom-formatter.ts: implement a formatter.printf.ts: interpolate printf-style messages.line-console.ts: update stable terminal lines.worker/: advanced Node worker transport with bounded pending records, acknowledgements, flushing, and graceful shutdown.