@greencoast/logger
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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.

Dependencies (1)

Dev Dependencies (5)

Package Sidebar

Install

npm i @greencoast/logger

Weekly Downloads

97

Version

1.1.1

License

MIT

Unpacked Size

7.03 kB

Total Files

6

Last publish

Collaborators

  • moonstar-x