Compartir a través de


Avoiding CeLog Data Loss (Windows CE 5.0)

Send Feedback

CeLog.dll logs data to a RAM buffer on the target device. A flush application like Remote Kernel Tracker or CeLogFlush.exe copies the data out of the RAM buffer. If data is logged to CeLog faster than the flush application can remove it from the RAM buffer, the buffer fills and no longer accepts data. At that point, CeLog cannot write data until the flush application removes data from the buffer. Any data that is logged when the RAM buffer is full is discarded.

The following sections offer suggestions for minimizing data loss.

  • Reduce the amount logged
  • Speed up flushing
  • Increase the size of the RAM buffer

Reduce the amount logged

To reduce the amount of data logged, reduce the number of zones that are set. Some zones, such as CELZONE_KCALL and CELZONE_HEAP, produce a large amount of data. If you do not need the events from these zones, turn them off. For more information on controlling the CeLog zone settings, see Filtering CeLog Events.

Most commonly, a combination of reducing the amount of data logged and increasing the size of the RAM buffer is sufficient to prevent data loss.

Speed up flushing

There are several ways to speed up flushing.

  • Store the data in a faster file system

    For example, it is faster to store data in the device file system than in the release directory of the development workstation. It is faster to store the data in a RAM-based file system than it is to write to flash.

  • Increase the priority of the flushing thread, if you are using CeLogFlush.exe or OSCapture.exe

    When CeLog collects a large amount of data from threads that have higher priority than the flushing thread, the overall logging process slows. For information about changing the priority of the flush thread, see CeLogFlush Registry Settings or OSCapture Registry Settings.

  • Reduce the amount of time spent opening the log file by forcing CeLogFlush.exe to hold the log file open continuously.

    If the log file is on a remote computer, holding the file open can reduce the amount of time CeLogFlush needs to write to a file by reducing connection time. To make CeLogFlush.exe hold the log file open continuously, change the file flags that CeLogFlush.exe uses. For more information about CeLog flags, see CeLogFlush Registry Settings.

    **Note   **Keeping a log file open can reduce connection time, but it also introduces other problems. For example, when CeLogFlush.exe is writing to the file, you cannot access the file to read it. Hence, to read the file, you must stop the log flushing process.

Increase the size of the RAM buffer

For information on increasing the size of the CeLog RAM buffer, see Modifying the Size of the CeLog Buffer.

Most commonly, a combination of reducing the amount of data logged and increasing the size of the RAM buffer is sufficient to prevent data loss.

See Also

Remote Kernel Tracker | Readlog Viewing Tool

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.