This is a small logging module that helps with a more organized message logging through color, logging type and timestamps.
With npm
:
npm install @moonstar-x/logger
or with yarn
:
yarn add @moonstar-x/logger
const logger = require('@moonstar-x/logger');
import logger from '@moonstar-x/logger';
You can log multiple types of messages. Objects will be serialized and stack traces will be shown.
logger.log('message to log');
logger.info('message to log');
logger.warn('message to log');
logger.error('message to log');
logger.fatal('message to log');
logger.debug('message to log');
You can clear the console with:
logger.clear();