logginglog
v2.0.0
Published
Een logging module voor alle mensen die gewoon snel een logger willen hebben
Readme
Logginglog
Powerful and colorful logging for Node.js — console or file-based!
Installation
npm install logginglogUsage
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:
bolditalicunderlinedim
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
