new Logger()
Logger
Returns:
logger:object
Methods
disableAll()
Logs at all levels are not allowed, which is equivalent to logger.setlevel(5)
Example
logger.disableAll()
Returns:
Void
download()
Down load logs in cache
Example
logger.download()
Returns:
Void
enableAll()
Allow logging at all levels, which is equivalent to logger.setlevel(0)
Example
logger.enableAll()
Returns:
Void
getLevel()
Get log level
Example
logger.getLevel()
Returns:
loglevel:number
getLogs()
Get logs in cache
Example
logger.getLogs()
Returns:
logs:oblect
setConfig(options)
Set logger configuration
Example
logger.setConfig({useCache: false, maxCache: 3 * 1024 * 1024})
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | -
Properties
|
Returns:
Void
setLevel(level)
Set log level
Example
logger.setLevel(0)
Parameters:
Name | Type | Description |
---|---|---|
level |
Number | log level |
Returns:
Void