The HotSync Log
The CDK
provides routines that add to a HotSync log. There are several of
them that are quite useful; the main one is
LogAddEntry.
long LogAddEntry(LPCTSTR logString, Activity act, BOOL timestamp)
You will continually use this routine to add entries to the HotSync log. Here are the parameters:
-
logstring The string displayed in the log.
-
timestamp This is a Boolean.
Truemeans that the log entry will be timestamped.-
act This is an enumerated type. Many different enumeration constants are available for your use. The enumerated types used most often as a value for
activityare as follows:-
slSyncStarted Tells the log that your conduit is beginning synchronization. Call the following when you begin the sync process:
LogAddEntry("", slSyncStarted, false)-
slSyncAborted Tells the log that your conduit is done and that there was an error. Call:
LogAddEntry(" your conduit name",slSyncAborted, false)
when you finish syncing with an error.
-
slSyncFinished Tells the log that your conduit is done without errors. Call:
LogAddEntry(" your conduit name", slSyncFinished, false)when you finish syncing without an error.
-
slWarning Adds the specified
logStringto the log and tells the user at the end of the HotSync that there are messages in the log.-
slText Adds the specified
logStringto the log, but doesn’t tell the user about the message.
-
long LogAddFormattedEntry(Activity act, BOOL timestamp,const char* dataString, ...)
Another useful routine is
LogAddFormattedEntry
. It acts as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access