github.com/portworx/docker@v1.12.1/docs/admin/logging/etwlogs.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "ETW logging driver"
     4  description = "Describes how to use the etwlogs logging driver."
     5  keywords = ["ETW, docker, logging, driver"]
     6  [menu.main]
     7  parent = "smn_logging" 
     8  +++
     9  <![end-metadata]-->
    10  
    11  
    12  # ETW logging driver
    13  
    14  The ETW logging driver forwards container logs as ETW events. 
    15  ETW stands for Event Tracing in Windows, and is the common framework
    16  for tracing applications in Windows. Each ETW event contains a message
    17  with both the log and its context information. A client can then create
    18  an ETW listener to listen to these events. 
    19  
    20  The ETW provider that this logging driver registers with Windows, has the 
    21  GUID identifier of: `{a3693192-9ed6-46d2-a981-f8226c8363bd}`. A client creates an 
    22  ETW listener and registers to listen to events from the logging driver's provider. 
    23  It does not matter the order in which the provider and listener are created. 
    24  A client can create their ETW listener and start listening for events from the provider, 
    25  before the provider has been registered with the system. 
    26  
    27  ## Usage
    28  
    29  Here is an example of how to listen to these events using the logman utility program 
    30  included in most installations of Windows:
    31  
    32     1. `logman start -ets DockerContainerLogs -p {a3693192-9ed6-46d2-a981-f8226c8363bd} 0 0 -o trace.etl`
    33     2. Run your container(s) with the etwlogs driver, by adding `--log-driver=etwlogs` 
    34     to the Docker run command, and generate log messages.
    35     3. `logman stop -ets DockerContainerLogs`
    36     4. This will generate an etl file that contains the events. One way to convert this file into 
    37     human-readable form is to run: `tracerpt -y trace.etl`. 
    38     
    39  Each ETW event will contain a structured message string in this format:
    40  
    41      container_name: %s, image_name: %s, container_id: %s, image_id: %s, source: [stdout | stderr], log: %s
    42  
    43  Details on each item in the message can be found below:
    44  
    45  | Field                | Description                                     |
    46  -----------------------|-------------------------------------------------|
    47  | `container_name`     | The container name at the time it was started.  |
    48  | `image_name`         | The name of the container's image.              |
    49  | `container_id`       | The full 64-character container ID.             |
    50  | `image_id`           | The full ID of the container's image.           |
    51  | `source`             | `stdout` or `stderr`.                           |
    52  | `log`                | The container log message.                      |
    53  
    54  Here is an example event message:
    55  
    56      container_name: backstabbing_spence, 
    57      image_name: windowsservercore, 
    58      container_id: f14bb55aa862d7596b03a33251c1be7dbbec8056bbdead1da8ec5ecebbe29731, 
    59      image_id: sha256:2f9e19bd998d3565b4f345ac9aaf6e3fc555406239a4fb1b1ba879673713824b, 
    60      source: stdout, 
    61      log: Hello world!
    62  
    63  A client can parse this message string to get both the log message, as well as its 
    64  context information. Note that the time stamp is also available within the ETW event. 
    65  
    66  **Note**  This ETW provider emits only a message string, and not a specially 
    67  structured ETW event. Therefore, it is not required to register a manifest file 
    68  with the system to read and interpret its ETW events.