Logging

A crucial part of most software app projects is logging, and social robot applications are no different. In fact, arguably, logging is even more important since the systems are real-time, multi-modal and the fact that it's extremely hard to predict the behavior of users.

Dialog logging

The most crucial logging to do for most interactions is usually dialog-logging. This contains what the robot says, what the user says, what intents the robot classified the user utterance as and what states your dialog flow is in, when each of these events happen. One very common use-case of analyzing logs is to enrich the language model of the skill. In practice, this means analyzing the user-utterances that:

  • the system did not understand - i.e no Intent classified
  • the system understood wrong - i.e it classified the wrong intent

Further on, you probably want to analyze what actions the robot took based on the intent the system classified.

Setting up dialog logging

Furhat comes with a dialog logger that logs the above events to a JSON file. It also logs audio of the user utterances so that you can analyse the interacton. You can initialize logging with dialogLogger.startSession() anywhere in the flow. Optionally, you can add parameters:

  • name: name for the session, will be used as folder for the log session
  • cloudToken: Furhat API token for logging to Furhat cloud (you can get one at your furhat.io profile)
  • maxLength: The maximum length of the logging (in seconds), after which it will end (default 600 = 10 minutes).

The logging will automatically stop when either:

  • The maxLength has been reached (see above)
  • You call dialogLogger.endSession()
  • The skill terminates

On your developer machine, the logs end up in:

  • Windows: %userprofile%/.furhat/logs
  • Mac and Linux: ~/.furhat

Log-viewer

If cloudToken is used as an optional parameter, logs will be stored in Furhat Cloud. You can view and delete these logs at the log-viewer page. You need to log in with the same user account that is associated with the API key used in the skill.

Logs created with cloudToken as a parameter are listed on the left side on the screen. Clicking on any of the logs will display the log of the interaction. You can listen to the audio files by clicking on the text.

Flow logging

Since you might, during your Furhat development, build quite complex flows with many states and transitions, we are also supplying a flow logger that logs all relevant info related to why certain flow transitions happened, what triggers were executed etc.