Skip to content

Commit

Permalink
Opt into IEventSource4
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillOsenkov committed Feb 9, 2022
1 parent 51079b7 commit 5e89c04
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ public sealed class MSBuildForwardingLogger : IForwardingLogger

public void Initialize(IEventSource eventSource)
{
// Declare lack of dependency on having properties/items in ProjectStarted events
// (since this logger doesn't ever care about those events it's irrelevant)
if (eventSource is IEventSource4 eventSource4)
{
eventSource4.IncludeEvaluationPropertiesAndItems();
}

// Only forward telemetry events
if (eventSource is IEventSource2 eventSource2)
{
Expand Down

0 comments on commit 5e89c04

Please sign in to comment.