caravan
A TypeScript-focused logging library combining log levels, context, and transports
What does it do?
When creating a logger, specify an ID and one or more transports, then record messages and context with level-specific methods. Child loggers inherit their parent logger's settings and can extend the context. Records can be sent to multiple transports at once, with a separate log level for each. You can change the stream output format or create transports for HTTP endpoints and databases. Middleware transforms or excludes records before delivery, while flush() waits for pending writes to finish before shutdown.
Key features
- Leveled logging with context
- Child loggers that inherit settings
- Multiple transports with per-transport log levels
- Stream output formatting and custom transports
- Middleware for transforming or excluding records, and flush()
