dstv-logger

2.0.2 • Public • Published

dstv-logger

Log things, prefixed with a timestamp

Usage

var dstvLogger = require('dstv-logger');
 
var config = {
ipAddress : '0.0.0.0',
OS : 'Samsung Smart TV',
appVersion : '2.5.1'
};
 
var logger = new dstvLogger(config);
 
logger.event('BITRATE CHANGE', '720p');
// [18:10:56] { key: 'BITRATE CHANGE', value: '720p' }
 
logger.log('a message');
// [16:27:02] a message
 
logger.error('ooops!');
// [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

Readme

Keywords

none

Package Sidebar

Install

npm i dstv-logger

Weekly Downloads

5

Version

2.0.2

License

MIT

Unpacked Size

2.89 kB

Total Files

3

Last publish

Collaborators

  • tshepomas