Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/msbuild/obtaining-build-logs-with-msbuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,21 @@ In the following example, a binary log file is created with the name *binarylogf
```cmd
-bl:binarylogfilename.binlog
```

You can use the [Structured log viewer](https://msbuildlog.com/) to view binary logs in a way that makes it much easier to see what is going on.

For more information, see [Command-line reference](../msbuild/msbuild-command-line-reference.md).

The binary log includes the following information from a build:
- Logged messages with the `diagnostic` verbosity level
- The full contents of files imported by each project
- Properties, their final value, and any property reassignments
- Items, their metadata, and any item updates or removals
- Task inputs and outputs

> [!NOTE]
> Since the binary logger includes a substantial amount of information from the build, large builds can experience measurable overhead when it is enabled.
> If you have a large, complex build, consider enabling the binary logger only when necessary to avoid longer overall build times.

## Use a custom logger

You can write your own logger by authoring a managed type that implements the <xref:Microsoft.Build.Framework.ILogger> interface. You might use a custom logger, for instance, to send build errors in email, log them to a database, or log them to an XML file. For more information, see [Build loggers](../msbuild/build-loggers.md).
Expand Down