[Draft] Proposal: remove debug logger as provider
rajarju opened this issue · 0 comments
rajarju commented
Proposal to remove debug logger as the default log provider and use winston logger.
Core logger
- Custom Formatter support
- Logging in JSON
- Eternal Log viewers
- Customise transports
- Log levels
- Switch log levels with
env
variables
debug
logger
- Debug logger uses a global
DEBUG
env variable to define log level and it cannot be over ridden by the aio library. - The environment variable takes precedence over
AIO_LOG_LEVEL
- Logs from 3rd party dependencies will also be logged when using this env variable
Winston
- Use winston as the only log provider
- Expose more winston configs via the aio core logger
- Dependency size
Other Loggers
Logger | Package Size (Minified) |
---|---|
winston | 136.9 kB |
bunyan | 15.7 kB |
log4js | 77.2 kB |
pino | 6.3 kB |
Bunyan
- API Similar to winston
- Serializers can be complicated
- Supports multiple streams
- Child loggers
Pino
- Light weight and fast
- asynchronous logging
- separate thread for transports
- No support for transports, file and stdout supported
- Logs only in JSON
- additional modules for compatibility
- custom log levels
- good documentation (https://getpino.io)
- pino debug (https://github.com/pinojs/pino-debug)
- no log rotation (use plugin)
- pino-http
- http benchmark