1.0.4 • Published 6 months ago

quick-logger-js v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

quicklogger

šŸš€ A NestJS-inspired TypeScript logger prioritizing blazing speed, performance, and simplicity.

Features

  • āš”ļø High-performance logging
  • šŸŽØ Colorized output
  • šŸŽÆ TypeScript support
  • ā±ļø Optional timestamps with time differences
  • šŸ” Contextual logging
  • šŸ“Š Multiple log levels
  • šŸ› ļø Configurable and extensible

Installation

npm i quick-logger-js

Quick Start

import { QuickLogger } from 'quick-logger-js';

// Create a logger instance
const logger = new QuickLogger({
  context: 'MyApp',
  timestamp: true
});

// Basic logging
logger.log('Application started');
logger.info('Server running on port 3000');
logger.warn('Resource usage high');
logger.error('Connection failed');

Configuration

Log Levels

  • log: Standard logs
  • error: Error messages
  • warn: Warning messages
  • debug: Debug information
  • verbose: Detailed information
  • fatal: Critical errors

Context Usage

// Global context from constructor
const logger = new QuickLogger({ context: 'MyApp' });

// Per-message context
logger.log('User logged in', 'Auth');
logger.error('Database connection failed', 'Database');

Performance

quicklog is designed for high-performance logging with:

  • Minimal overhead
  • Optimized string concatenation
  • Efficient memory usage
  • No unnecessary object allocations

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1.0.4

6 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago