Initializing a Log Device

Initializing a log device requires that you create a device string that defines the logging output. For information about creating a device string, see Device string.

The following procedures describe how to initialize a log device and set up your desired logging output.

To initialize a log device by using C

To initialize a log device by using C++

  1. Instantiate a CWTTLogger object.
  2. Call the CWTTLogger::CreateLogDevice method and pass it a device string and the handle to the log device.

To initialize a log device by using COM

  1. Instantiate a WTTLogger object.
  2. Call the IWTTLog::CreateLogDevice method and pass it a device string and the handle to the log device.

To initialize a log device by using .NET

  1. Use the Microsoft.WTT.Log namespace.
  2. Create a new WTTLogger object and pass it a device string.

This section includes:

Device String

Log Device Types

See Also

Getting Started with DTM Logger, Code Samples for DTM Logger

Send feedback on this topic
Built on December 10, 2009