pretty-pino-loggers
v1.0.1
Published
Logger with human-readable, colorized console output
Downloads
72
Maintainers
Readme
@pretty/loggers
A TypeScript logger with human-readable, colorized console output. It provides multiple severity levels, ISO 8601 timestamps.
Installation
npm install @pretty/loggersUsage
import { logger } from '@pretty/loggers';
logger.info('Application started');
logger.debug('Debug information', { key: 'value' });
logger.warn('Warning message');
logger.error('Error occurred', new Error('Something went wrong'));
logger.fatal('Fatal error');Log levels
| Level | Purpose |
| ------- | -------------------------------------------- |
| trace | Fine-grained diagnostic detail |
| debug | Information useful during development |
| info | General operational messages |
| warn | Potentially harmful or unexpected situations |
| error | Failures that do not stop the application |
| fatal | Severe errors that may terminate execution |
Features
- Color-coded output per log level
- Distinct visual markers (icons) for quick scanning
- Timestamps in ISO 8601 format
- First-class TypeScript typings
- No runtime dependencies
License
MIT
