log element
Last Updated: 08-30-2005
VoiceXML 2.0
Writes a message to the debug log. When you use Tellme Studio to execute your VoiceXML applications, you can use the Debug Log Viewer to view these messages.

Syntax

<log
label = "string"
labelexpr = "ECMAScript_Expression"
/>

Attributes
label
A string that may be used to categorize the log message.
labelexpr
An ECMAScript expression that evaluates to the string used to categorize the log message. This attribute is a Tellme extension.

Parents
block, catch, error, filled, foreach, help, if, noinput, nomatch, prompt

Children
value

Remarks
The label and labelexpr attributes are mutually exclusive.
To write to the Log within a script element, use the vxmllog function. The vxmllog function does not currently support the ability to specify a label.
A single log message is limited to 1000 characters. A longer message will be truncated.
Examples

The following example writes some simple text to the log.

<?xml version="1.0"?>
<vxml version="2.1"
 xmlns="http://www.w3.org/2001/vxml">
<form>
   <block>
      <log>Hello, world.</log>
   </block>
</form>
</vxml>

The following example writes the contents of a variable to the log.

<?xml version="1.0"?>
<vxml version="2.1"
 xmlns="http://www.w3.org/2001/vxml">
<form>
   <var name="uid" expr="12345"/>
   <block>
      <log><value expr="uid"/></log>
   </block>
</form>
</vxml>

The following example writes simple text and the contents of a variable to the log.

<?xml version="1.0"?>
<vxml version="2.1"
 xmlns="http://www.w3.org/2001/vxml">
<form>
   <var name="uid" expr="12345"/>
   <block>
      <log>uid is <value expr="uid"/></log>
   </block>
</form>
</vxml>


[24]7 Inc.| Terms of Service| Privacy Policy| General Disclaimers