npm.io
2.1.0 • Published 3 years ago

ic-logs

Licence
MIT
Version
2.1.0
Deps
1
Size
18 kB
Vulns
0
Weekly
0

ic-logs

Logs library to iClubs developers.

Functions:

  • verboseLog: logs only when LOGTYPE is equal to _verbose.

  • log: logs only when LOGTYPE is equal to _standard or verbose.

  • errorLog: logs only when LOGTYPE is equal to _standard, verbose, or error.

When LOG_TYPE is equal to:

  • verbose: the errorLog, verboseLog, and log functions will be considered.
  • standard: the errorLog and log functions will be considered.
  • error: only the errorLog function will be considered.
  • no: no function is considered.

Note: LOG_TYPE is a mandatory environment variable.

Install

npm

npm i ic-logs

yarn

yarn add ic-logs

Usage

const logger = require('ic-logs');

logger.log(any);
logger.verboseLog(any);
logger.errorLog(any);

OR

const { log, verboseLog, errorLog } = require('ic-logs');

log(any);
verboseLog(any);
errorLog(any);

ES Module or Typescript Import

import { log, verboseLog, errorLog } from 'ic-logs';

Contact

For support use iClubs contact channels.