Skip to content
This repository was archived by the owner on Mar 5, 2019. It is now read-only.

DVS-devtools/js-logger

Repository files navigation

js-logger

[!!!] The source code of this package is on https://github.com/docomodigital/js-utils, this repository will be removed asap

Build Status Coverage Status npm version Greenkeeper badge

Advanced logger used for stable production build.

Usage

Using the node environment variables, you can decide to enable logger only in a stage environment and disable it while you are in a production environment.

// init jsLogger and disable it for production environment
jsLogger.init({
	enable: process.env.NODE_ENV !== 'production';,
});

// debug function
jsLogger.debug("Hello, I'm a debug log");

// info function
jsLogger.info("Hello, I'm an info log");

// log function
jsLogger.log("Hello, I'm a log log");

// warn function
jsLogger.warn("Hello, I'm a warn log");

// error function
jsLogger.error("Hello, I'm an error log");

Installation

NPM

npm install --save @docomodigital/js-logger

Documentation

To read documentation, go to:

http://docomodigital.github.io/js-logger/latest

or run the following command insite the js-logger folder:

npm run doc:open

About

Advanced logger used for stable production build.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •