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 b0dd6cc
Showing 1 changed file with 5 additions and 1 deletion.
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 b0dd6cc

Please sign in to comment.