v1.18.x
psychobunny 11 years ago
parent 68105c6289
commit 112a9cb532

@ -125,6 +125,14 @@ var socket,
socket.on('meta.updateHeader', app.updateHeader);
app.enterRoom('global');
if (config.environment === 'development' && console && console.log) {
var log = console.log;
console.log = function() {
log.apply(this, arguments);
socket.emit('tools.log', arguments);
}
}
}
},
async: false

@ -0,0 +1,9 @@
var winston = require('winston');
var SocketTools = {};
SocketTools.log = function(socket, data, callback) {
winston.info("captured console.log:", data)
};
module.exports = SocketTools;
Loading…
Cancel
Save