共用方式為


CeLog Event Tracking Macros

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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.

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