app-debug-logger
v0.0.8
Published
A powerful and customizable logging library for Javascript Application
Downloads
3
Readme
App Debug Logger
This Package is use for debug any Javascript Application.
Logger Setup
Import Package
ES5
const { Logger } = require("app-debug-logger");
ES56
import { Logger } from 'app-debug-logger'
Logger Config
const config = {
id : "custom-id",
isEventLog : true,
consoleLog : ['info', 'error', 'warn', 'success', 'debug'],
isProduction : false,
}
| Key | Type | Default Value |
| :--- | :---: | :--- |
| id | string
| app-debug-logger
|
| isEventLog | boolean
| false
|
| consoleLog | array
| ['info', 'error', 'warn', 'success', 'debug']
|
| isProduction | boolean
| false
|
Initialize Logger
const LOG = new Logger(config);
Logger Methods
| Method | Parameters |
| :--- | :--- |
| debug | moduleName, log
|
| info | moduleName, log
|
| warn | moduleName, log
|
| sucess | moduleName, log
|
| error | moduleName, log
|
| on | loggerId, callback
|