logger

logger functionalities.

The above command would starts a tcp server on the port 8000 for logs.

Classes

Logger

Methods

(inner) defaults(name)

Parameters:
Name Type Description
name string

the log tag

Example
var logger = require('logger')('some tag')
logger.log('test')
logger.error('something went wrong')

(inner) defaults(level, authorization)

set upload level to cloud

Parameters:
Name Type Description
level number

set logLevels.none to disable; set level between [verbose, error] to enable

authorization string

cloudgw authorization

Throws:

level out of range or missing authorization

Type
Error
Example
var setGlobalUploadLevel = require('logger').setGlobalUploadLevel
// enable
setGlobalUploadLevel(level, "your gw authorization")
// disable
setGlobalUploadLevel(logLevels.none)