Created
August 6, 2015 13:11
-
-
Save chadfurman/b2faf63615894c5a9eca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(robot) { | |
response_orig = { | |
send: robot.Response.prototype.send, | |
reply: robot.Response.prototype.reply | |
} | |
robot.Response.prototype.send = function() { | |
var args = Array.prototype.slice.call(arguments); | |
log_it(this, args); | |
response_orig.send.call(this, args); | |
} | |
//robot.Response.prototype.reply = function() { | |
// console.log(arguments); | |
// var args = Array.prototype.slice.call(arguments); | |
// console.log('replying (args: ' + args + ') (message: ' + this.message + ')'); | |
// log_it(this.message, args); | |
// response_orig.reply.call(this, args); | |
//} | |
}; | |
function log_it(message, data) { | |
console.log('this.message:' + JSON.stringify(this.message, null, '\t')); | |
console.log('this.envelope:' + JSON.stringify(this.envelope, null, '\t')); | |
console.log(arguments); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment