CCXML and Voice XML application logging

By default, <log> element application logging messages from CCXML and VoiceXML applications are sent to the log.n.log file, created in the $DTJ_LOGS directory, which by default, is /var/dirTalk/DTBE/dtj_logs. (n is a number between 1 and 10 (by default). This file is created on each machine running the Java and VoiceXML environment.

In addition, you can also redirect application logging messages from CCXML and VoiceXML applications to your own logging application by adding the following properties in the dtj.ini file:

For example:

user.log.classpath=/usr/log/log.jar
user.log.class=mypackage.mylogger

These parameters identify a class that implements the Blueworx Voice Response user logging Java interface. If the jar file defined in user.log.classpath is not in the Java CLASSPATH, it is loaded dynamically when the user logging application is started.

Blueworx Voice Response provides an example .jar file $DTJ_HOME/samples/userlog.jar that contains the class and source file for the example class examples.UserLog. The example class implements the interface and provides simple logging to a finite set of files (userlog.0.log through userlog.9.log) in the /tmp directory that are reused in sequence. You can customize this application to modify the way that CCXML and VoiceXML application logging is handled for your system. To use the sample application, you must add the following properties to dtj.ini:
user.log.classpath=/var/dirTalk/DTBE/samples/userlog.jar
user.log.class=examples.UserLog

If the appropriate parameters are set in dtj.ini file, you can use the following commands to control user logging.

The dtjshost command starts the redirection of CCXML and VoiceXML application logging to the user logging application by invoking the user.log.class defined in dtj.ini and the command dtjshost -exit stops it. This allows you to control redirection of CCXML and VoiceXML application logging when the HostManager is started and stopped. The dtjshost command is explained in full in dtjshost script.

To start the redirection of CCXML and VoiceXML application logging without the need to stop or start the Host Manager, use the dtjuserlog command.

The command dtjuserlog -exit stops the redirection of CCXML and VoiceXML application logging. The DT_shutdown command also does this.

User Logging Java interface

The user class is instantiated using a constructor with no parameters. Immediately after the class is instantiated, its open method void open() is invoked. When the invoking class is closing the user class is called with:
void close();

For each new log message the interface write method is called with the following parameters:

Table 1. User Logging Java interface write method parameters
Parameter Data Type
LogData String (value of log tag)
Type Integer (VXML_LOG_TYPE or CCXML_LOG_TYPE)

These are defined in the definition of the interface.

rootURI String (root URI of document from which log was issued)
URI String (URI from which log was issued)
TrunkNumber Integer

Currently, TrunkNumber is always passed by Blueworx Voice Response set to -1 (undefined).

PortID Integer

Currently, PortID is always passed by Blueworx Voice Response set to -1 (undefined).

callID -used if Type parameter is VXML Long (unique call ID starting from 1 (at dtjstart) and increasing for each call)
sessionID - used if Type parameter is CCXML String (unique call ID starting from 1 (at dtjstart) and increasing for each call)