Botframework-sdk: bot.use / Logging Node.js

Created on 9 Sep 2016  路  1Comment  路  Source: microsoft/botframework-sdk

@Stevenic

How can we have a common place where i can log all My Incoming/ outgoing Messages

We need to log all Incoming and Outgoing messages
Message text + UserID

As of now i am able to capture all incoming messages by "bot.use"..

Not sure how can we get outgoing messages

Most helpful comment

@VishalWaman try this:

bot.use({
    receive: function (event, next) {
        console.log("rec", event);
        next();
    }, 
    send: function (event, next) {
        console.log("snd", event);
        next();
    }
});

closing for now, let me know if you have any further trouble and we'll re-open!

>All comments

@VishalWaman try this:

bot.use({
    receive: function (event, next) {
        console.log("rec", event);
        next();
    }, 
    send: function (event, next) {
        console.log("snd", event);
        next();
    }
});

closing for now, let me know if you have any further trouble and we'll re-open!

Was this page helpful?
0 / 5 - 0 ratings