Using TraceLogging

The following topics provide a TraceLogging quick start for C/C++ and .NET code, with examples.

Prerequisites

  • Windows 10 Software Development Kit (SDK) is required to write a user-mode provider
  • Windows Driver Kit (WDK) is required to write a kernel-mode provider

In this section

  • TraceLogging C/C++ Quick Start

    This topic describes the basic steps required to add TraceLogging to C or C++ user-mode code.

  • TraceLogging .NET Quick Start

    This topic describes the basic steps required to add TraceLogging to .NET code.

  • Record and Display TraceLogging Events

    Record TraceLogging events with the Windows Performance Recorder (WPR) and view them with the Windows Performance Analyzer (WPA).

  • C/C++ Tracelogging Examples

    This topic contains C/C++ Tracelogging examples.

  • .NET Tracelogging Examples

    This topic contains a .NET Tracelogging example that illustrates how to log an event only when the session verbosity level is verbose, and how to log structured event data.

  • Universal Windows Platform Logging Example

    This sample shows how to use the Logging APIs in the Windows.Foundation.Diagnostics namespace, including LoggingChannel, LoggingActivity, LoggingSession, and FileLoggingSession. These classes are designed for diagnostic logging within a Windows app. These APIs were added in Windows 8.1.

    The LoggingChannel and LoggingActivity APIs have been extended in Windows 10 to support writing complex events using TraceLogging event encoding.

    The Universal Windows Platform logging example can downloaded from GitHub.

TraceLogging for kernel-mode drivers and components