CeLogFlush Registry Settings (Windows Embedded CE 6.0)

1/5/2010

You can modify the behavior of the CeLogFlush application that flushes the CeLog log by changing specific registry values.

The CeLog registry settings are located under the HKEY_LOCAL_MACHINE\System\CeLog key.

Typically, to create a run-time image with predefined settings, add registry settings to the projects file before building the run-time image.

You can also use the Registry Editor in Platform Builder to add the settings to a device. However, changes made from the Registry Editor are not persistent to the registry files. Therefore, the next time that you download the image, you must configure the registry again. For more information, see Registry Editor.

The following table shows the named values you can set for the CeLog key.

Value: type Default Description

BufferSize: REG_DWORD

0x00020000 = 131072, or 128KB

Specifies the size, in bytes, of the CeLog RAM buffer that stores event activity before flushing.

FileName: REG_SZ

"\release\celog.clg"

Name of log file to store the data in.

FileSize: REG_DWORD

0, no limit

Specifies a size limit for the generated log file, in hexadecimal.

At the beginning of a flush, if the log file exceeds the specified size, the log file is renamed to <Logfile>.old. Thus, log files can actually grow to approximately twice the specified FileSize.

This option forces the FileFlags value to be set to 2, because the rename happens only when the file is opened at the start of a flush.

FileFlags: REG_DWORD

0

DWORD value that governs file management. Set to one of the following:

  • 0=Auto-close the log file if no data has been lost recently. This balances performance with file access convenience.
  • 1=Never close the log file. This option maximizes performance, but does not close the file handle.
  • 2=Always close the log file. This option maximizes file accessibility during logging.

FlushTimeout: REG_DWORD

0x00002710 = 10000, or 10 seconds.

Sets the timeout, in milliseconds, between successive "flushes."

SavedFlushes: REG_DWORD

0x0000000F = 15

Sets the number of "flushes" to buffer in RAM.

ThreadPriority: REG_DWORD

0x000000F8 = 248, the lowest real-time priority.

Sets the priority of the flushing thread (0-255).

Transport: REG_SZ

LocalFile

Transport to use. This value must be set to LocalFile, which stores data in log file on the local file system

UseUI: REG_DWORD

0

Boolean value that indicates type of messages.

  • 1=use popup messages
  • 0=debug messages only

ZoneCE: REG_DWORD

  • 0x000043E3
  • This value represents the bitwise OR of the following zone values:
  • CELZONE_PROCESS
  • CELZONE_THREAD
  • CELZONE_RESCHEDULE
  • CELZONE_PRIORITYINV
  • CELZONE_CRITSECT
  • CELZONE_SYNCH
  • CELZONE_LOADER
  • CELZONE_INTERRUPT

Specifies the CeLog zone settings.

If this value is present, CeLogFlush will call CeLogSetZones to pass the zones to CeLog.

Examples

The following examples show how to set common registry values that control CeLogFlush behavior.

  • Default
    These settings store the data in a log file called celog.clg in the release directory on the host PC.

    [HKEY_LOCAL_MACHINE\System\CeLog]
        "Transport"="LocalFile"
        "FileName"="\\release\\celog.clg"
    

    The default file name, \release\celog.clg, requires the release file system, relfsd, to transport the data. Because of this, the default settings for CeLogFlush require a KITL connection to Platform Builder on the development workstation.

  • Log file stored at root directory.
    This example stores the log file in the root of the file system on the device. It does not require a connection to the development workstation.

    [HKEY_LOCAL_MACHINE\System\CeLog]
        "Transport"="LocalFile"
        "FileName"="celog.clg"
    
  • Log file on a storage card.
    This method requires a storage card on a device.

    [HKEY_LOCAL_MACHINE\System\CeLog]
        "Transport"="LocalFile"
        "FileName"="\\Storage Card\\celog.clg"
    
  • Flush every second

    [HKEY_LOCAL_MACHINE\System\CeLog]
        "FlushTimeout"=dword:3E8
    
  • Low priority of flush thread
    This method lowers the thread priority for log flush from the default of 248 to 251, which corresponds to THREAD_PRIORITY_NORMAL.

    [HKEY_LOCAL_MACHINE\System\CeLog]
        "ThreadPriority"=dword:FB
    

See Also

Reference

CeLogFlush Command-Line Overrides

Other Resources

CeLogFlush.exe
Real-Time Priority System Levels