Enable EMP compatibility package engine logging - AWS End-of-Support Migration Program (EMP) for Windows Server

Enable EMP compatibility package engine logging

This topic contains information to help you to enable logging for the EMP compatibility package engine. By default, logging is disabled. Logging helps you identify problems with applications running in an EMP package.

Logs generated by the compatibiity engine are created in the following folders, regardless of the release.

  • On Windows Server 2008 and later versions: *%LocalAppData%\AWSEMP\Logs*

  • On Windows Server 2003: %UserProfile%\Local Settings\Application Data\AWSEMP\Logs

Note

LocalAppData resolves to a special location for the SYSTEM account: C:\Windows\System32\config\systemprofile\AppData\Local.

Each time the package engine runs, two logs are created:

  • Log for package engine — Outputs to reversedate-time-PID-Compatibility.Package.Engine.log. For example, 20190425-113000-000600-Compatibility.Package.Engine.log.

  • Log for the child process(es) redirected by the package engine — outputs to reversedate-time-parentPID-PID-ExecutableName.log. For example, 20190425-113000-000600-002820-MyApp.log.

The package engine log for child processes includes the following columns:

Column Description

TIMESTAMP

The date and time that the log file entry was written.

TID

The thread ID that generated the log item.

LOG TYPE

Defines the type of log entry:
  • INFO — Contains general information, such as a file redirection.

  • ERROR — Generated when the Windows API function fails.

  • DEBUG — Contains details about how the compatibility package engine is running.

CATEGORY

The area to which each API belongs. For example, File or Registry. Categories also include subcategories, such as Redirected or NotRedirected

FUNCTION-LINE

The function that generates a log event message. This will often be a Windows API, although internal compatibility package engine functions generate their own log events.

FROM

Typically, the from/original name. For example, the filename, registry key, and so forth

TO

Typically, the virtualized name (filename, registry). It can also be empty to indicate that the original name is the same.
Note

For application logging, the FROM/TO fields are populated when virtualizing from one location to another. However, FROM can be used only to record the details of an API accessing a location that is not virtualized (for example, registry access to a non-virtualized path). The FROM/TO fields can also be empty when a location or object isn't virtualized, but for which a log event should be recorded (the message will contain details about the event). For example, the NotWow64Process virtualizes the Windows API PrintDlg, and the information about this is recorded

MESSAGE

Additional information related to the function that generates the log event (for example, other parameters). This means that the information is different for each function. For example, for FILE APIs, the information could be the desired access. For COM, it could be the class registration.

ERROR (CODE)

When an error occurs, the generated error code is displayed.

MESSAGE

The error message associated with the error code.

Enable compatibility package engine logging

  1. Navigate to the package folder.

  2. Open Compatibility.Package.Engine.clc in a text editor, such as Notepad++.

  3. Create the tag using the following command and set the value for Log to one of the following, depending on the level of logging required.

    • Off — The default. Logging is disabled.

    • On — Only high-level APIs are logged. There is no nesting of log entries/logging of any lower-level API calls. For example, when you create a file, the CreateFile API is called. This, in turn, calls the lower level API NTCreateFile. When logging is set to On, you will not see entries for the lower-level APIs called, such as NTCreateFile.

    • Verbose — All entries, including both high-level and low-level API calls.

    <AAV Log="<value>"