1.1.4 • Published 9 years ago

kepek-logger v1.1.4

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

kepek-logger

Build Status

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

Preview

npm.io

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

npm.io