0.1.5 • Published 2 years ago
@gallofeliz/logger v0.1.5
Logger
Note: This module is part of @gallofeliz/js-libs that is a personal project. It is not developed nor tested for applications that need high security or scalability.
Simple logger:
- log -> processors -> obfuscation -> handlers (own processors + format + transport)
- Advanced childs (not only metadata but also own processors and handlers stack)
- Default simple JSON console logging
- logfmt formatter available
- Secrets Obfuscation
- CrossFingers logs : debug logs that are flushed in case of warning/error (keep logs > level1 and flush on level2 or less)
const logger = createLogger({...})
const child = logger.child({child: true})
child.info('My log', {password: 'secret'})
// Will log {level: 'info', message: 'My log', password: '***', child: true, timestamp: '(date)'}