Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

Logging Interface


Detailed Description

The VXIlog Facility supports the following types of log streams:
.

Across all streams, the log implementation is responsible for automatically supplying the following information in some manner (possibly encoded into a file name, possibly in a data header, possibly as part of each log message) for end consumer use:

In addition, for diagnostic logging the log implementation is responsible for defining a mechanism for enabling/disabling messages on an individual tag basis without requiring a recompile for use by consumers of the diagnostic log. It is critical that Diagnostic( ) is highly efficient for cases when the tag is disabled: in other words, the lookup for seeing if a tag (an integer) is enabled should be done using a simple array or some other extremely low-overhead mechanism. It is highly recommended that log implementations provide a way to enable/disable tags on-the-fly (without needing to restart the software), and log implementations should consider providing a way to enable/disable tabs on a per-channel basis (for enabling tags in tight loops where the performance impact can be large).

Each of the streams has fields that need to be allocated by developers. The rules for each follows. As background, several of these fields require following the rules for XML names: it must begin with a letter, underscore, or colon, and is followed by one or more of those plus digits, hyphens, or periods. However, colons must only be used when indicating XML namespaces, and the "vxi" and "swi" namespaces (such as "swi:SBprompt") are reserved for use by Vocalocity, Inc.


Classes

struct  VXIlogInterface
 VXIlog interface for logging The VXIlogInterface provides a set of functions which are used for logging by all the OpenVXI browser components. More...

Defines

#define LOG_EVENT_VECTOR_SUPPORTED(logIntf)   (logIntf->GetVersion( ) >= 0x00010001)
 Macros to determine the availability of new methods.
#define LOG_CONTENT_METHODS_SUPPORTED(logIntf)   (logIntf->GetVersion( ) >= 0x00010001)

Typedefs

typedef *enum VXIlogEvent VXIlogEvent
 Standard VXIlog events.
typedef enum VXIlogResult VXIlogResult
 Result codes for interface methods.
typedef VXIlogInterface VXIlogInterface
 VXIlog interface for logging The VXIlogInterface provides a set of functions which are used for logging by all the OpenVXI browser components.

Enumerations

enum  VXIlogEvent {
  VXIlog_EVENT_CALL_START = 0, VXIlog_EVENT_CALL_END = 1, VXIlog_EVENT_LOG_ELEMENT = 2, VXIlog_EVENT_SPEECH_DETECTED = 3,
  VXIlog_EVENT_ENDPOINTER_AUDIO = 4, VXIlog_EVENT_RECOGNIZER_AUDIO = 5, VXIlog_EVENT_RECOGNITION_START = 6, VXIlog_EVENT_RECOGNITION_END = 7,
  VXIlog_EVENT_SPEECH_RESULT = 8, VXIlog_EVENT_DTMF_RESULT = 9, VXIlog_EVENT_PLATFORM_DEFINED = 10000
}
 Standard VXIlog events. More...
enum  VXIlogResult {
  VXIlog_RESULT_FATAL_ERROR = -100, VXIlog_RESULT_IO_ERROR = -8, VXIlog_RESULT_OUT_OF_MEMORY = -7, VXIlog_RESULT_SYSTEM_ERROR = -6,
  VXIlog_RESULT_PLATFORM_ERROR = -5, VXIlog_RESULT_BUFFER_TOO_SMALL = -4, VXIlog_RESULT_INVALID_PROP_NAME = -3, VXIlog_RESULT_INVALID_PROP_VALUE = -2,
  VXIlog_RESULT_INVALID_ARGUMENT = -1, VXIlog_RESULT_SUCCESS = 0, VXIlog_RESULT_FAILURE = 1, VXIlog_RESULT_NON_FATAL_ERROR = 2,
  VXIlog_RESULT_UNSUPPORTED = 100
}
 Result codes for interface methods. More...

Functions

*SBLOGMAPPER_API VXIlogResult SBlogErrorMapperCreate (const VXIVector *errorMapFiles, SBlogErrorMapper **mapper)
 Create a new XML error mapper.
SBLOGMAPPER_API VXIlogResult SBlogErrorMapperDestroy (SBlogErrorMapper **mapper)
 Destroy an XML error mapper.
SBLOGMAPPER_API VXIlogResult SBlogErrorMapperGetErrorInfo (SBlogErrorMapper *mapper, VXIunsigned errorID, const VXIchar *moduleName, const VXIchar **errorText, VXIint *severityLevel)
 Map an error ID to text and a severity.


Define Documentation

#define LOG_CONTENT_METHODS_SUPPORTED logIntf   )     (logIntf->GetVersion( ) >= 0x00010001)
 

#define LOG_EVENT_VECTOR_SUPPORTED logIntf   )     (logIntf->GetVersion( ) >= 0x00010001)
 

Macros to determine the availability of new methods.


Typedef Documentation

typedef * enum VXIlogEvent VXIlogEvent
 

Standard VXIlog events.

Standardized events that may be reported to the VXIlog interface. Platform dependant events start at VXIlog_EVENT_PLATFORM_DEFINED and increase from there.

typedef struct VXIlogInterface VXIlogInterface
 

VXIlog interface for logging The VXIlogInterface provides a set of functions which are used for logging by all the OpenVXI browser components.

typedef enum VXIlogResult VXIlogResult
 

Result codes for interface methods.

Result codes less then zero are severe errors (likely to be platform faults), those greater then zero are warnings (likely to be application issues)


Enumeration Type Documentation

enum VXIlogEvent
 

Standard VXIlog events.

Standardized events that may be reported to the VXIlog interface. Platform dependant events start at VXIlog_EVENT_PLATFORM_DEFINED and increase from there.

Enumeration values:
VXIlog_EVENT_CALL_START 
VXIlog_EVENT_CALL_END 
VXIlog_EVENT_LOG_ELEMENT 
VXIlog_EVENT_SPEECH_DETECTED 
VXIlog_EVENT_ENDPOINTER_AUDIO 
VXIlog_EVENT_RECOGNIZER_AUDIO 
VXIlog_EVENT_RECOGNITION_START 
VXIlog_EVENT_RECOGNITION_END 
VXIlog_EVENT_SPEECH_RESULT 
VXIlog_EVENT_DTMF_RESULT 
VXIlog_EVENT_PLATFORM_DEFINED 

enum VXIlogResult
 

Result codes for interface methods.

Result codes less then zero are severe errors (likely to be platform faults), those greater then zero are warnings (likely to be application issues)

Enumeration values:
VXIlog_RESULT_FATAL_ERROR  Fatal error, terminate call.
VXIlog_RESULT_IO_ERROR  I/O error.
VXIlog_RESULT_OUT_OF_MEMORY  Out of memory.
VXIlog_RESULT_SYSTEM_ERROR  System error, out of service.
VXIlog_RESULT_PLATFORM_ERROR  Errors from platform services.
VXIlog_RESULT_BUFFER_TOO_SMALL  Return buffer too small.
VXIlog_RESULT_INVALID_PROP_NAME  Property name is not valid.
VXIlog_RESULT_INVALID_PROP_VALUE  Property value is not valid.
VXIlog_RESULT_INVALID_ARGUMENT  Invalid function argument.
VXIlog_RESULT_SUCCESS  Success.

Note that Success is defined as 0 and that all critical errors are less than 0 and all non critical errors are greater than 0.

VXIlog_RESULT_FAILURE  Normal failure, nothing logged.
VXIlog_RESULT_NON_FATAL_ERROR  Non-fatal non-specific error.
VXIlog_RESULT_UNSUPPORTED  Operation is not supported.


Function Documentation

* SBLOGMAPPER_API VXIlogResult SBlogErrorMapperCreate const VXIVector *  errorMapFiles,
SBlogErrorMapper **  mapper
 

Create a new XML error mapper.

Parameters:
errorMapFiles [IN] VXIVector of local OpenSpeech Browser PIK XML error mapping files
mapper [OUT] Handle to the error mapper
Returns:
VXIlog_RESULT_SUCCESS on success

SBLOGMAPPER_API VXIlogResult SBlogErrorMapperDestroy SBlogErrorMapper **  mapper  ) 
 

Destroy an XML error mapper.

Parameters:
mapper [IN/OUT] Handle to the error mapper, set to NULL on success
Returns:
VXIlog_RESULT_SUCCESS on success

SBLOGMAPPER_API VXIlogResult SBlogErrorMapperGetErrorInfo SBlogErrorMapper *  mapper,
VXIunsigned  errorID,
const VXIchar moduleName,
const VXIchar **  errorText,
VXIint severityLevel
 

Map an error ID to text and a severity.

Parameters:
mapper [IN] Handle to the error mapper
errorID [IN] Error ID to map as passed to VXIlog::Error( )
moduleName [IN] Module name reporting the error as passed to VXIlog::Error( )
errorText [OUT] Error text as defined in the error mapping file. Owned by the error text mapper, must not be modified or freed.
severity [OUT] Severity identifier as defined in the error mapping file. Owned by the error text mapper, must not be modified or freed. Typically one of the following: 0 -> UNKNOWN (no mapping found) 1 -> CRITICAL 2 -> SEVERE 3 -> WARNING
Returns:
VXIlog_RESULT_SUCCESS on success


Generated on Wed Jun 1 12:50:19 2005 for OpenVXI by  doxygen 1.4.2