Alan Studio logs

With Alan Studio logs, you can get useful runtime information about your voice assistant, see how voice scripts operate and identify issues. To access logs in Alan Studio, at the bottom of the code editor, click the up icon.

Alan AI logs the following types of events:

  • System logs: general system messages

  • Syntax logs: information about errors and problems in voice scripts

  • Phrases logs: information about unrecognized phrases, input interactions and the voice assistant replies during dialog sessions

Note

In addition to the system log data, you can generate log messages from your voice script. For details, see Writing messages to Alan Studio logs.

To get information about a specific type of messages, use filters at the top of the logs panel:

  • Syntax OK: to display syntax errors in the voice script

  • Errors: to display the voice assistant runtime errors

  • Info: to display the voice assistant info messages and messages written with the console.log function

  • Unrecognized: to display unrecognized users’ phrases

  • Input: to display input interactions

  • Output: to display output interactions

  • Cur. dialog: enable this option to display log messages only for the current dialog session

  • Cur. script: enable this option to display log messages only for the voice script currently selected in the left pane

You can also export logs or clear the logs pane:

  • To export logs to a CSV file, in the top right corner of the logs pane, click the Download logs icon.

  • To clear logs, in the top right corner of the logs pane, click the Clear logs icon.

../../../_images/logs.png

Writing messages to Alan Studio logs

To diagnose problems and debug your voice assistant, use the console.log() function. You can insert the function in corresponding points of voice scripts to:

  • Check the output for slots and variables used in the script

  • Capture events

  • Troubleshoot errors and so on

To see the logged message, open Alan Studio logs, make sure the Info filter is on and find the required line in Alan Studio logs.

In the example below, all values captured with the NUMBER and FOOD slots are written to the logs:

intent('I want $(NUMBER) $(FOOD burger_|pizza_|wing_) and $(NUMBER) $(FOOD burger_|pizza_|wing_)', p => {
    console.log('Numbers array:', p.NUMBER_);
    console.log('Food array:', p.FOOD_);
    p.play(`Your order is: ${p.NUMBER_[0].number} ${p.FOOD_[0].value} and ${p.NUMBER_[1].number} ${p.FOOD_[1].value}`);
});
../../../_images/logging-example.png