1.1.1 • Published 10 months ago

@greencoast/logger v1.1.1

Weekly downloads
149
License
MIT
Repository
github
Last release
10 months ago

ci-build-status issues bundle-size version downloads-week downloads-total

@greencoast/logger

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.

Usage

Installation

With npm:

npm install @greencoast/logger

or with yarn:

yarn add @greencoast/logger

Importing the Package

const logger = require('@greencoast/logger');
import logger from '@greencoast/logger';

Logging Messages

You can log multiple types of messages. Objects will be serialized and stack traces will be shown.

LOG

logger.log('message to log');

INFO

logger.info('message to log');

WARN

logger.warn('message to log');

ERROR

logger.error('message to log');

FATAL

logger.fatal('message to log');

DEBUG

logger.debug('message to log');

Clear Console

You can clear the console with:

logger.clear();

Author

This module was made by Greencoast Studios.