What problem does it solve?
The logging system centralizes and standardizes application logs to provide structured, searchable outputs, protect sensitive information, and surface diagnostic context for monitoring and debugging across modules and services.
Core Features & Use Cases
- Structured Logging: JSON-formatted entries with timestamp, level, and subsystem fields for easy ingestion into log stores.
- Subsystem Isolation: Per-module loggers that label and separate logs by subsystem for clearer traces.
- Sensitive Data Protection: Regex-based and rules-driven redaction of API keys, tokens, and personal data.
- Diagnostic Context & Metrics: Attach request IDs, session info, and performance metrics to log events to aid tracing and alerting.
- Multiple Outputs & Resilience: Console, file with rotation, and remote sinks with fallback behavior to avoid losing logs.
- Observability Integration: Supports metrics collection and distributed tracing hooks for OpenTelemetry workflows.
- Use Case: Deploy this logger in a microservices environment to redact secrets, stream structured logs to your observability pipeline, and attach request IDs for end-to-end traceability.
Quick Start
Use logger-design to create a subsystem logger that redacts keys, emits JSON logs to console and file, and includes request IDs for diagnostics.