You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iptv/scripts/helpers/log.js

18 lines
327 B
JavaScript

3 years ago
const log = {}
3 years ago
log.print = function (message) {
if (typeof message === 'object') message = JSON.stringify(message, null, 2)
process.stdout.write(message)
3 years ago
}
log.start = function () {
this.print('Starting...\n')
console.time('Done in')
3 years ago
}
log.finish = function () {
console.timeEnd('Done in')
3 years ago
}
module.exports = log