dstv-logger
Log things, prefixed with a timestamp
Usage
var dstvLogger = ; var config = ipAddress : '0.0.0.0'OS : 'Samsung Smart TV'appVersion : '2.5.1'; var logger = config; loggerevent'BITRATE CHANGE' '720p';// [18:10:56] { key: 'BITRATE CHANGE', value: '720p' } logger;// [16:27:02] a message logger;// [16:27:02] ooops!
API
logger.log(msg...)
Logs the message as if you called console.log
but prefixes the output with the
current time in HH:MM:ss format.
logger.error(msg...)
Logs the message as if you called console.error
but prefixes the output with the
current time in HH:MM:ss format.
logger.warn(msg...)
Logs the message as if you called console.warn
but prefixes the output with the
current time in HH:MM:ss format.
logger.info(msg...)
Logs the message as if you called console.info
but prefixes the output with the
current time in HH:MM:ss format.
logger.event(key, value)
Logs player (QOS) specific events such as pause, play, bitrate change, etc
License
MIT