Skip to content

Commit

Permalink
Adding ConsoleLogger to a compiler data logger outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
AllDwarf committed Aug 5, 2024
1 parent 65ce486 commit c1af956
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ReleaseHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- NEW => new feature

## UNRELEASED
* BUG: Fork telemetry to log always to Console and AppInsights in the same time when Error occur. [1002](https://github.com/microsoft/binskim/pull/1002)

## **v4.3.0**
* DEP: Update `msdia140.dll` from 14.36.32532.0 to 14.40.33810.0. This update fixes the `System.AccessViolationException: Attempted to read or write protected memory` exception that occurs when reading certain PDB files. [996](https://github.com/microsoft/binskim/pull/996)
Expand Down
6 changes: 5 additions & 1 deletion src/BinSkim.Driver/MultithreadedAnalyzeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Microsoft.CodeAnalysis.IL.Sdk;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.CodeAnalysis.Sarif.Driver;
using Microsoft.CodeAnalysis.Sarif.Writers;

namespace Microsoft.CodeAnalysis.IL
{
Expand Down Expand Up @@ -54,8 +55,11 @@ public override BinaryAnalyzerContext InitializeGlobalContextFromOptions(Analyze

var ruleTelemetryLogger = new RuleTelemetryLogger(this.Telemetry.TelemetryClient);
ruleTelemetryLogger.AnalysisStarted();

aggregatingLogger.Loggers.Add(ruleTelemetryLogger);

var consoleLogLogger = new ConsoleLogger(false, this.Tool.Driver.FullName);
aggregatingLogger.Loggers.Add(consoleLogLogger);

context.Logger = aggregatingLogger;
}

Expand Down

0 comments on commit c1af956

Please sign in to comment.