<log>
New in VoiceXML 2.0. Writes debugging information to a the BeVocal Café call log, which you can view on the Café web site.
Syntax
<log
label="string"
expr="js_expression"
>
Debugging Text
</log>
Description
Similar functionality is available within a JavaScript script using the bevocal.log function.
| Attribute |
Description |
label
|
A string that is added as a label to messages produced by this <log> element. Optional (default is no label on the messages).
|
expr
|
JavaScript expression that evaluates to a string to be added to the call log as a separate message. Optional.
|
A <log> element may write one or two messages to the call log. It writes one message corresponding to the expr attribute, if any, and one message corresponding to the contained debugging text, if any. If the element has a label attribute, the specified label precedes each message.
|
|
Tip:
|
| | If a JavaScript expression contains any of the characters "<", ">", or "&", that character must be replaced with the corresponding escape sequence "<", ">", or "&". For more information, see JavaScript Quick Reference. |
|
Usage
See Also
| | VoiceXML 2.0 Specification: <log> |
Examples
<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
"http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="foo">
<!-- Print current value of num and fruit variables -->
<block name="dbg">
<log>
num: <value expr="num"/>
fruit: <value expr="fruit"/>
</log>
</block>
<field name="num" type="number">
<prompt>Say a number.</prompt>
</field>
<field name="fruit">
<grammar type="application/x-nuance-gsl">
[ apples oranges ]
</grammar>
<prompt>Do you want apples or oranges?</prompt>
</field>
<filled mode="any" namelist="num fruit">
<clear namelist="dbg"/>
</filled>
<block>
<log>
End of form foo reached
</log>
</block>
</form>
</vxml>
[Show Frames] [FIRST] [PREVIOUS] [NEXT]