@jamx/logger
@jamx/logger keeps log creation, convenience methods, processing, formatting, and output as separate pieces.
CoreLogger creates structured records, Logger provides a console-like API,
processors can adjust records, and transports decide where logs go. Logging is
best-effort: processor, formatter, and transport failures do not escape into
application code.
Install
Section titled “Install”pnpm add @jamx/loggerQuick Example
Section titled “Quick Example”import { ConsoleTransport, createNamedLogger, PrettyFormatter, Severity,} from "@jamx/logger";
const logger = createNamedLogger({ name: "api", minSeverity: Severity.Info, transport: new ConsoleTransport(new PrettyFormatter({ colorize: true })),});
logger.info("Request completed", { requestId: "req_123", durationMs: 18,});Next Steps
Section titled “Next Steps”- Start with Quick Start.
- Learn the logging pipeline.
- Add processors for redaction and enrichment.
- Choose transports and formatters for output.
- Learn how to flush and close transports during graceful shutdown.