LogEvent

Purpose

Use LogEvent to identify a variable or constant that is of interest, and write the value to a file.


A screen capture of the Action LogEvent window

Description

Use LogEvent to identify a variable or constant that is of interest and write the value to a file. You can use LogEvent to monitor the values of variables at various stages of application execution to help diagnose problems with a state table. LogEvent can capture the values of multiple variables if the values have been concatenated to a single variable. Use AssignData to concatenate multiple values.

What LogEvent does with the event information depends on whether you define the event as a system event, a private event, or both:

Refer to theBlueworx Voice Response for AIX: Configuring the System information for information about viewing logged events.

Naming a private event log file

There are two ways to identify the log file: either use the default name assigned by Blueworx Voice Response or provide your own name as part of the information to be logged:

Parameters

The parameters for LogEvent identify the variables or constants of interest and define the events that involve them as system events, private events, or both.

Possible results

Succeeded
The value of the variable or constant has been logged.
Invalid Event
The value of the specific variable or constant identified cannot be logged.
Host Problem
The value could not be logged due to a system problem.

ASCII syntax

When using an ASCII editor, code this action with these parameters in the following order:

  1. The variable or constant to be logged as a system event, or the constant VAR_UNDEFINED
  2. The variable or constant to be logged as a private event, or the constant VAR_UNDEFINED.

For example, to log the variable in3_s as a system event only:

label: "Check Edges"
	LogEvent(in3_s, VAR_UNDEFINED)
	  edge EDGE_LOG_SUCCESSFUL:		  successful
	  edge EDGE_LOG_INVALID_EVENT: 	 invalid_event
	  edge EDGE_LOG_HOST_PROBLEM:		 host_problem
	;

The parameters and edges are described above, in "Parameters" and "Possible results". For more information, see Testing a state table using the debugger.