|VoiceXML 2.1 Development Guide||Home | Frameset Home|
logstatements placed within code can greatly assist when tracking variable values, and errors that occur in the application.
|expr||Data Type: CDATA||Default: Optional|
|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).|
|<?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"/>
<var name="SomeVar" expr="'NSMA'"/>
If you look in the Voxeo Logger, you will
see the value of the log statements.
<log expr="'Pretty freaking cool, eh?'" label="coolness"/>
|ANNOTATIONS: EXISTING POSTS|
|where is placed the result of <log> tag?, please that someone answer, i work with envox 2.0 platform, thanks.|
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.
|Thank you very much Matt.|
|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|
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.
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:
var myVariable ='some cool value'
ccxmllog("myVariable = "+myVariable);
Again, do note that this only applies to CCXML 1.0, and will not work when using VoiceXML.
|Can you add <field> values to the log expr statement?|
Sure, you can log any valid variable value.
This is a prompt.
<log expr="'***** Field's value is: ' + inputValue"/>