@kevinwang0316/log

1.0.1 • Public • Published

Log Helper

A log helper to shutdown log information based on the process.env configuration

Build Status Coverage Status

Installing

npm install --save @kevinwang0316/log

Configuration

Add a log_level variable to your .env file. Or if you are using Fass solution such as AWS Lambda, set up the log_level to your environment.

Log all level of information (debug, info, warn, error) log_level=DEBUG

Log info and above levels of information (info, warn, error) log_level=INFO

Log warn and above levels of information (warn, error) log_level=WARN

Log just error level of information (error) log_level=ERROR

Usage

import log from '@kevinwang0316/log';
// For NodeJS
// const log = require(''@kevinwang0316/log'');

log.debug('Your debug information');
log.info('Your info information');
log.warn('Your warn information');
log.error('Your error information');

License

Log is licensed under MIT License - see the License file.

Readme

Keywords

Package Sidebar

Install

npm i @kevinwang0316/log

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

4.9 kB

Total Files

4

Last publish

Collaborators

  • kevinwang0316