<log>

Description

The <log> element allows the application to generate messages for debugging.  This element can contain a combination of text and <value> elements, and the resulting message will be the concatenation of the text and string value of <value> element.  The message will be logged to one or more files for viewing, as well as to the page that is sent as an email (if applicable).

 

Note: A failure to evaluate a <value> inside a <log> will result in an error.semantic event being thrown.

Syntax


<log expr="ECMAScript_Expression" label="string" cond="ECMAScript_Expression" level="integer" dest="dest1 dest2 ..." | "metrics" | "maintainer" | "syslog"> text </log>

Attributes

Attribute

Description

expr

An ECMAScript expression of which the evaluated value will be appended to the <log> element content and label attribute value. Optional.

label

A string label that will be appended to the <log> element content before the value of the expr attribute is appended. Optional.

cond

An ECMAScript expression to be evaluated and used as a boolean condition. This log will be executed only if the expression evaluates to true. Optional. (Defaults to true.)

A platform extension.

level

An integer value that must be less than or equal to the loglevel property value for this log to be executed. Optional. (Defaults to 1.)

A platform extension.

dest

A space-separated list of files (dest1 .. destn) to which the message generated by this log should be written. Each desti is one of:

  • metrics (pw_metricsfile log)
  • syslog (system log)
  • file:path/filename (user defined log file relative to the "logs" directory)
Can also be "none" (log is ignored).  If you own a VoiceGenie platform, you can also set this attribute to "calllog" to control full-call recording.  See the GenieSupport tutorial for details. Optional. (Defaults to metrics.)

A platform extension.

Parents

Block Catch Error Filled ForEach Help If Noinput Nomatch

Children

Value #PCDATA

Usage Notes

To use the dest 'syslog', the Call Manager must be configured with SYSLOG as a sink.  Additionally, the 'NGI' syslog flag should be enabled for message 4002.

VoiceGenie Extensions

Limitations/Restrictions

Example


<?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <form> <field name="field1" type="boolean"> <prompt>Please say yes or no.</prompt> <filled> You said <value expr="field1"/>. <log>The user said <value expr="field1"/>.</log> </filled> </field> </form> </vxml>