terminal-formatter
v1.0.0
Published
Pretty terminal logger for consoles: ISO timestamps, level icons, and colorized output with zero runtime deps
Maintainers
Readme
terminal-formatter
A small termnial logger for console: ISO timestamps, emoji level icons, and optional ANSI colors—aimed at command-line tools and local development.
Installation
npm install terminal-formatterUsage
import logger from 'terminal-formatter';
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 | Very detailed tracing |
| debug | Debugging |
| info | General information |
| warn | Warnings |
| error | Errors |
| fatal | Unrecoverable failures |
Features
- Per-level colors in supported clis
- Emoji icons for quick scanning
- ISO-8601 timestamps on each
- Pretty customized and formatting style
- Written in TypeScript with bundled type declarations
- No runtime dependencies beyond Node
License
MIT
