Sure, you could copy and paste some logging code all over the place, but there must be a cleaner way.
In this article I’ll show you a few simple tricks to be able to save each message going to and from your botframework chatbot.
Let’s start off by saving messages going to any dialog that implements
In order to implement
IDialog<T> you only need to implement the
StartAsync method; however, this isn’t much use on its own, so let’s get the dialog into a conversation loop by adding in a
MessageReceivedAsync method and calling that from
StartAsync and from itself: