1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/lib/debug.js
Mario de Frutos Dieguez f384e86302 Added timestamp to debug traces (#1426)
* Added timestamp to debug traces

* Make it compatible with node 0.10 and 0.12
2019-05-07 22:50:25 +02:00

14 lines
272 B
JavaScript

'use strict';
var index = require('../');
function debug () {
if (index.debug_mode) {
var data = Array.prototype.slice.call(arguments);
data.unshift(new Date().toISOString());
console.error.apply(null, data);
}
}
module.exports = debug;