Partilhar via


BinaryLogger Class

Definition

A logger that serializes all incoming BuildEventArgs in a compressed binary file (*.binlog). The file can later be played back and piped into other loggers (file, console, etc) to reconstruct the log contents as if a real build was happening. Additionally, this format can be read by tools for analysis or visualization. Since the file format preserves structure, tools don't have to parse text logs that erase a lot of useful information.

public ref class BinaryLogger sealed : Microsoft::Build::Framework::ILogger
public sealed class BinaryLogger : Microsoft.Build.Framework.ILogger
type BinaryLogger = class
    interface ILogger
Public NotInheritable Class BinaryLogger
Implements ILogger
Inheritance
BinaryLogger
Implements

Remarks

The logger is public so that it can be instantiated from MSBuild.exe via command-line switch.

Constructors

BinaryLogger()

Initializes a new BinaryLogger instance.

Properties

CollectProjectImports

Gets or sets whether to capture and embed project and target source files used during the build.

Parameters

Gets or sets the parameters. The only supported parameter is the output log file path (for example, "msbuild.binlog").

Verbosity

Gets or sets the verbosity level.

Methods

Initialize(IEventSource)

Initializes the logger by subscribing to events of the specified event source and embedded content source.

Shutdown()

Closes the underlying file stream.

Applies to