1.2.5 • Published 7 years ago

logger.me v1.2.5

Weekly downloads
5
License
SEE LICENSE IN LI...
Repository
github
Last release
7 years ago

logger.me

Tired of console.log pain in your applications? Look no further. logger.me is a simple to use and lightweight vanilla js wrapper around the old console.log.

logger.me helps you centralize and gain full control of your logs around the application.

Prerequisites

None. Just plain old Javascript ;)

Installation

npm install logger.me

Usage

Types of logs

Logger.log('Test with log');
Logger.warn('Test with warn');
Logger.info('Test with info');
Logger.error('Test with error');

Sending parameters

Logger.log('One param', 'String');
Logger.log('Many params', 'String', 1, true, {test: 'logger'}, function () {});

Inactivate all logs

Logger.inactive();

Activate all logs

Logger.active();

Namespaces

Using namespaces you can group your logs together, making it very easy to manage them:

Logger.ns('MY_MODULE').log('myFunction1');
Logger.ns('MY_MODULE2').log('myFunction2');
Logger.ns('MY_MODULE3').log('myFunction3');

Namespaces - inactivate logs

Logger.ns('MY_MODULE').inactive();    

Namespaces - activate logs

Logger.ns('MY_MODULE').active();

Browser compatibility

  • Internet Explorer 9+
  • Firefox
  • Chrome

License

This project is licensed under the MIT License - see the LICENSE.md file for details

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago