This is a small logging module that helps with a more organized message logging through color, logging type and timestamps. Used in Greencoast Studios packages and projects.
With npm
:
npm install @greencoast/logger
or with yarn
:
yarn add @greencoast/logger
const logger = require('@greencoast/logger');
import logger from '@greencoast/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();
This module was made by Greencoast Studios.