VoiceXML 2.1 Development Guide Home  |  Frameset Home


<log>  element


The log element allows the developer to output debug messages to the Voxeo Logger. Generous use of log statements placed within code can greatly assist when tracking variable values, and errors that occur in the application.


usage

<log expr="CDATA" label="CDATA">


attributes

expr Data Type: CDATA Default: Optional
The expr attribute contains the JavaScript message to be output to the logger. Keep in mind that all non-parsable characters need to be escaped.
label Data Type: CDATA Default: Optional
The 'label' attribute is used to define a user-defined string which can be specified for informational purposes (such as a reason for the log statement itself).



shadow variables

none


parents

<block>   <catch>   <error>   <filled>   <help>   <if>   <noinput>   <nomatch>


children

<value>


code samples

<Log expr-label> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<form id="F1">

  <block>
    <var name="SomeVar" expr="'NSMA'"/>

    <log expr="'***********************'"/>

    <prompt>
      If you look in the Voxeo Logger, you will
      see the value of the log statements.
    </prompt>

    <log expr="'***********************'"/>
    <log expr="'Pretty freaking cool, eh?'" label="coolness"/>
    <log expr="'***********************'"/>
  </block>

</form>
</vxml>



additional links

W3C 2.0 Specification


  ANNOTATIONS: EXISTING POSTS
1597
10/11/2005 7:46 AM (EDT)
where is placed the result of <log> tag?, please that someone answer, i work with envox 2.0 platform, thanks.
MattHenry
10/11/2005 9:24 AM (EDT)
Hi there,

Bear in mind that as I am not familiar with the Envox implementation, it is going to be difficult for me to answer this. In our own system, the log statements will appear in our real-time debugger output, (see http://www.voicexmlguide.com/loggerfeatures.htm for details). However, I am not sure if the Envox platform has anything similar to our implementation. If Envox supports the <meta> email feature, then your log ststements might well apppear there as well.

Happy hunting!

~Matt
Asier
10/11/2005 10:36 AM (EDT)
Thank you very much Matt.
agonzalez
5/19/2006 3:56 AM (EDT)
in case you have uploaded your files to another server will the log statements get logged in a plain text?can i make only the logged information to be logged not the rest of information only need sessionid and callerid to be logged thanks
MattHenry
5/19/2006 11:01 AM (EDT)


Hi there,

I think that there is confusion over what to expect from the <log> element. This element is meant to output values in the debugger stream so that you may easily track variable values as they execute in the code; it does not store values anywhere at all on your server, or ours.

http://docs.voxeo.com/voicexml/2.0/loggerfeatures.htm

~Matthew Henry
kunalp25
4/21/2009 3:34 PM (EDT)
Can you log within the Javascript itself?
MattHenry
4/21/2009 3:47 PM (EDT)

Hi there,

In the VoiceXML context, you cannot issue a <log> statement via an ECMAScript statement. However, you *can* do so within the CCXML 1.0 context:


<script>
<![CDATA[
  var myVariable ='some cool value'
  ccxmllog("myVariable = "+myVariable);
]]>
</script>

Again, do note that this only applies to CCXML 1.0, and will not work when using VoiceXML.

~Matt
iskram
2/10/2011 3:28 PM (EST)
Can you add <field> values to the log expr statement?
voxeoJeffK
2/10/2011 5:02 PM (EST)
Hello,

Sure, you can log any valid variable value.

  <field name="inputValue">
    <grammar type="text/gsl">[whatever]</grammar>
    <prompt>
      This is a prompt.
    </prompt>
    <filled>
      <log expr="'***** Field's value is: ' + inputValue"/>
    </filled>
  </field>

Regards,
Jeff Kustermann
Voxeo Support

login



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