Skip to content

computer-wilco/logginglog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logginglog

Powerful and colorful logging for Node.js — console or file-based!

Installation

npm install logginglog

Usage

import logginglog from 'logginglog';

const logger = logginglog.createLogger();
logger.log('Hello world!');
logger.info('Information');
logger.warn('Warning');
logger.error('Error message');

Custom logger with color and styles

const custom = logginglog.customLogger('MyLogger', {
  color: 'blue',
  styles: ['bold', 'underline']
});

custom('A custom log line');

Supported styles:

  • bold
  • italic
  • underline
  • dim

Supported colors:

All chalk-extra colors, such as red, green, blue, cyan, etc.

Log to file

const fileLogger = logginglog.createFileLogger('mylogs.txt');
fileLogger.log('This line will be written to the file.');

License

MIT

About

Een logging module voor alle mensen die gewoon snel een logger willen hebben

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published