Skip to content

PaxtonTerryDev/quicklog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quicklog

A minimal, color-coded logging utility for Node.js and TypeScript applications. Quicklog provides five log levels (debug, info, warn, error, fatal) with distinct color formatting via chalk, optional timestamps, and automatic suppression of debug messages in production. It requires no configuration to get started—just import and use.

To install, run npm install @paxtonterrydev/quicklog. Import the log object and call the appropriate method for your message severity. Debug messages are hidden when NODE_ENV=production, and calling log.fatal() sets process.exitCode = 1 for graceful shutdown handling. Enable timestamps by setting log.timestamp = true.

Usage

import { log } from '@paxtonterrydev/quicklog';

log.debug('Only shown in development');
log.info('Application started');
log.warn('Deprecated feature used');
log.error('Failed to connect');
log.fatal('Unrecoverable error'); // Sets process.exitCode = 1

// Enable timestamps
log.timestamp = true;
log.info('Message with timestamp');

// Log objects with full depth
log.object({ nested: { data: { here: true } } });

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors