CallXML 3.0 Development GuideHome  |  Frameset Home


<log>  element

The <log> element replaces the deprecated <simline> element for the purpose out outputting debugging text to the Voxeo logger.


usage
<log test="CDATA" value="STRING" value-is="STRING" value-is-not="STRING">


attributes
testData Type: CDATADefault: Optional
The 'test' attribute is a new supplement to the CallXML markup that permits the developer to execute the contents of a container element, or action element, based on whether or not the specified condition is met. If the defined condition is met, then the code contained within the element is then executed. If the condition is not met, then the application resumes execution with the next sequential container container element in the document.
valueData Type: STRINGDefault: none - attribute is required
The value attribute should define the string message to be output to the Voxeo logger.
value-isData Type: STRINGDefault: none - attribute is optional
Another new attribute, 'value-is', grants the developer with the ability to perform conditional logic upon container elements, or action elements for the first time within the CallXML markup. The value specified in the 'value-is' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is' equate to 'true', then the element specified will execute. If the value equates to 'false' then the element will be skipped during document execution.
value-is-notData Type: STRINGDefault: none - attribute is optional
Another new attribute, 'value-is-not', grants the developer with the ability to perform conditional logic upon container elements, or action elements, for the first time within the CallXML markup. The value specified in the 'value-is-not' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is-not' equate to 'false', then the element specified will execute. If the value equates to 'true' then the element will be skipped during document execution.



code samples
<3.0 log value-is - value-is-not>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="3.0">


<do label="B1" value="$session.callerID;">

<log value-is="4071112233">*** callerID is from Orlando</log>
<log value-is-not="2121112233">*** callerID is not from New York<log>
<log value-is-not="4071112233">*** callerID is not from Orlando<log>


</do>

</callxml>

<3.0 log value>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="3.0">

<do label="D1">

  <prompt>
    Ready to output some debugging text?
    Open the Voxeo logger, and give this app a call!
  </prompt>

  <log value="*** SHINY HAPPY PEOPLE **"/>
  <log>*** ANNOY THE HELL OUT OF THE REST OF US ***</log>


  </do>

</callxml>


<3.0 log-test>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="3.0">


<do label="B1">

<assign var="MyANI" value="4071112233">

<log test="'$MyANI;' ='4071112233'">*** this will execute</log>
<log test="'$MyANI;' !='4075551122'">*** this will execute</log>
<log test="'$MyANI;' ='4075553344'">*** this will NOT execute</log>


</do>

</callxml>



additional links
none


  ANNOTATIONS: EXISTING POSTS
jpw
1/19/2008 6:42 PM (EST)
what is 'name=' in the example???? name= is NOT listed on the <assign> documentation.
jpw
1/19/2008 6:44 PM (EST)
uh, don't you think one of THE most common uses of Log will be to SHOW a VARIABLE's contents? So, how about an example of that?
voxeojeff
1/20/2008 12:11 AM (EST)
Hello,

The 'name=' is actually a typo, and will be corrected in the next documentation update.  As for outputting the contents of a variable, we can certainly add an example of this, such as...

<?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0">
  <assign var="MyVar" value="'Mister Rogers'"/>
  <do label="B1">
    <say> Hello there </say>
    <log> Variable is $MyVar; </log>
  </do>
</callxml>

Regards,

Jeff
SSAUK_SIGDEV
6/19/2008 12:11 PM (EDT)
Is there a way of dumping the value of all variables using the log message?

This would be *extremely* useful.
voxeojeff
6/19/2008 2:55 PM (EDT)
Hello,

This can always be done by specifying more than one variable in the log statement.

<log> $MyVar1; $MyVar2; $MyVar3; </log>

If this isn't what you were referring to, please clarify a bit so we can provide a more accurate answer for you.

Thanks,

Jeff

login



© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site