Partager via


CeLog Event Tracking Macros (Compact 2013)

3/28/2014

The following macros are used to call CeLog functions.

Macro

Description

CELOGDATA(Time, ID, Data, Length, Zone1, Zone2)

Logs raw data to the CeLog buffer.

CELOGDATAFLAGGED(Time, ID, Data, Length, Zone1, Zone2, Flag)

Logs raw data to the CeLog buffer, and adds an extra user-defined flag to the data being logged

RETAILCELOG(Cond, ID, Data, Len)

Logs data from events of a specified ID when a conditional evaluates as TRUE. If the conditional is FALSE, nothing will be logged.

Logs data only for Retail and Debug builds

DEBUGCELOG(Cond, ID, Data, Len)

Logs data from events of a specified ID when a conditional evaluates as TRUE. If the conditional is FALSE, nothing will be logged.

Logs data only for Debug builds.

RETAILCELOGMSG(cond, printf_exp)

Conditionally prints the message printf exp to the CeLog buffer from a retail build.

DEBUGCELOGMSG(cond, printf_exp)

Conditionally prints the message printf exp to the CeLog buffer from a debug build.

IsCeLogEnabled (Status, ZoneCE)

Determines if CeLog is loaded with a particular status and if one of the zones is enabled.

Can be used to determine whether to make a call to CeLogData. This macro allows applications to quickly skip the call if CeLog is not enabled or if CeLog is not gathering the right data.

IsCeLogStatus (Status)

Determines if CeLog is loaded with a particular status.

Can be used to determine whether to make a call to CeLogData. This macro allows applications to quickly skip the call if CeLog is not enabled or if CeLog is not gathering the right data.

IsCeLogZoneEnabled (ZoneCE)

Determines if CeLog is loaded with a general status and if one of the zones is enabled.

Can be used to determine whether to make a call to CeLogData. This allows applications to quickly skip the call if CeLog is not enabled or if CeLog is not gathering the right type of data.

Example

The following example shows how to make calls to the CeLog macros from any application. This example assumes that the CELZONE_MISC zone is enabled.

#include <celog.h> 
LONG lData[10]; // Initialization not shown here... 
WORD wMyFlag = 1; 
CELOGDATA(1, CELID_RAW_LONG, &lData, (WORD)(10*sizeof(LONG)), 1, CELZONE_MISC); 
CELOGDATAFLAGGED(1, CELID_RAW_LONG, &lData, (WORD)(10*sizeof(LONG)), 1, CELZONE_MISC, wMyFlag); 

See Also

Reference

CeLog Event Tracking Reference