diff --git a/ReleaseHistory.md b/ReleaseHistory.md index fb7b47bb..3f6122aa 100644 --- a/ReleaseHistory.md +++ b/ReleaseHistory.md @@ -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) diff --git a/src/BinSkim.Driver/MultithreadedAnalyzeCommand.cs b/src/BinSkim.Driver/MultithreadedAnalyzeCommand.cs index 725bfeb9..80bb0cb9 100644 --- a/src/BinSkim.Driver/MultithreadedAnalyzeCommand.cs +++ b/src/BinSkim.Driver/MultithreadedAnalyzeCommand.cs @@ -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 { @@ -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; }