new Logger(label, tag, stylesopt)
Parameters:
Name | Type | Attributes | Default | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
label |
String | OFF|DEBUG|INFO|WARN|ERROR|ALL | |||||||||||
tag |
String | a tag to identify a log group. it will be prepended to any log function | |||||||||||
styles |
Object |
<optional> |
{background:"white",color:"black"} | -
Properties
|
Example
var myLogger = new Logger("ALL", "TAG",{background:"black",color:"blue"});
myLogger.i("Somenthing", 1); // output will be > ["TAG"], "Somenthing", 1
myLogger.setLevel("off") // other values OFF|DEBUG|INFO|WARN|ERROR|ALL
Methods
d(argumentsopt)
Debug Logging
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arguments |
* |
<optional> |
e(argumentsopt)
Error Logging
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arguments |
* |
<optional> |
i(argumentsopt)
Info Logging
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arguments |
* |
<optional> |
setLevel(label)
Set the level of the logger
Parameters:
Name | Type | Description |
---|---|---|
label |
String | OFF|DEBUG|INFO|WARN|ERROR|ALL |
w(argumentsopt)
Warn Logging
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arguments |
* |
<optional> |