KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.41k stars 188 forks source link

Support for Extended Data #703

Closed rokonec closed 10 months ago

rokonec commented 10 months ago

Implementing: https://github.com/dotnet/msbuild/issues/9091

Context

MSBuild introduced new concept of Event args Extended data which are supposed to address need to extend events. One of its most appealing use cases is for passing extended compiler error and warning structured information into msbuild logging infrastructure. Having such info in binlog and viewer might be of use.

Changes Made

rokonec commented 10 months ago

Attached is binary log for testing if needed. binlog.zip

KirillOsenkov commented 10 months ago

this is nice! I think if extended data is available, we should manufacture a message as a child node of the extended event, and put the full text in there. Also if extended metadata is present, add metadata child nodes for each metadata

KirillOsenkov commented 10 months ago

See Construction.AddProperties for an example, but maybe use Metadata instead of Property