You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Added timestamp to debug traces (#1426)
* Added timestamp to debug traces * Make it compatible with node 0.10 and 0.12
This commit is contained in:
committed by
Ruben Bridgewater
parent
12265a5079
commit
f384e86302
@@ -4,7 +4,9 @@ var index = require('../');
|
||||
|
||||
function debug () {
|
||||
if (index.debug_mode) {
|
||||
console.error.apply(null, arguments);
|
||||
var data = Array.prototype.slice.call(arguments);
|
||||
data.unshift(new Date().toISOString());
|
||||
console.error.apply(null, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user