kepek-logger

1.1.4 • Public • Published

kepek-logger

Build Status

The Console API wrapper with silent mode and logging depending on the chosen log level.

Preview

Installation

$ npm install --save kepek-logger

Usage

window.console = require('kepek-logger')({
    silent: false, // isDebugMode
});

Documentation

Options

silent

A bool to specify silent mode. It will help you to hide all console messages.

Defaults to false.

silent: false

level

A string to specify the log level.

Defaults to debug.

level: 'debug'

prefix

Specify this option if you want to set a prefix for all log messages. Must be a string.

Defaults to undefined.

prefix: function () {
    return new Date().toString();
}

API

Support browser native console API. See https://goo.gl/QC43CC for more details.

License

MIT

ఠ ͟ಠ Pull requests are welcome, naturally

install

npm i kepek-logger

Downloadsweekly downloads

6

version

1.1.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability