mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
Add even more MSAL error telemetry (#246335)
This commit is contained in:
committed by
GitHub
parent
1b1ed33f82
commit
febbcf78c8
@@ -5,11 +5,15 @@
|
||||
|
||||
import { LogLevel as MsalLogLevel } from '@azure/msal-node';
|
||||
import { env, LogLevel, LogOutputChannel } from 'vscode';
|
||||
import { MicrosoftAuthenticationTelemetryReporter } from './telemetryReporter';
|
||||
|
||||
export class MsalLoggerOptions {
|
||||
piiLoggingEnabled = false;
|
||||
|
||||
constructor(private readonly _output: LogOutputChannel) { }
|
||||
constructor(
|
||||
private readonly _output: LogOutputChannel,
|
||||
private readonly _telemtryReporter: MicrosoftAuthenticationTelemetryReporter
|
||||
) { }
|
||||
|
||||
get logLevel(): MsalLogLevel {
|
||||
return this._toMsalLogLevel(env.logLevel);
|
||||
@@ -27,6 +31,7 @@ export class MsalLoggerOptions {
|
||||
switch (level) {
|
||||
case MsalLogLevel.Error:
|
||||
this._output.error(message);
|
||||
this._telemtryReporter.sendTelemetryErrorEvent(message);
|
||||
return;
|
||||
case MsalLogLevel.Warning:
|
||||
this._output.warn(message);
|
||||
|
||||
Reference in New Issue
Block a user