Noah Stahl
Noah Stahl

Reputation: 7553

Disable trace logging in ADAL.NET

What is the correct method to disable trace logging in the ADAL SDK in ASP.NET environment? I've tried setting the static configuration property to false in Startup.cs, but this doesn't seem to turn off the verbose logging in the VS output.

AdalTrace.LegacyTraceSwitch.Level = TraceLevel.Off;

This references setting this for "Desktop", but no mention of ASP.NET differences if any:

ADAL source

Upvotes: 2

Views: 344

Answers (1)

gsharp
gsharp

Reputation: 71

This seems to do the trick in ADAL v3

LoggerCallbackHandler.UseDefaultLogging = false;

Upvotes: 2

Related Questions