Optional PII logging (#11322)

* Start with logger

* allow user to enable PII logging

* prefix the log
This commit is contained in:
Amir Omidi
2020-07-13 13:05:00 -07:00
committed by GitHub
parent 347c193455
commit ff979f90d1
7 changed files with 86 additions and 25 deletions

View File

@@ -17,6 +17,7 @@ import { SimpleTokenCache } from './simpleTokenCache';
import { AzureAuth, TokenResponse } from './auths/azureAuth';
import { AzureAuthCodeGrant } from './auths/azureAuthCodeGrant';
import { AzureDeviceCode } from './auths/azureDeviceCode';
import { Logger } from '../utils/Logger';
const localize = nls.loadMessageBundle();
@@ -127,7 +128,7 @@ export class AzureAccountProvider implements azdata.AccountProvider, vscode.Disp
}
if (this.authMappings.size === 0) {
console.log('No auth method was enabled.');
Logger.log('No auth method was enabled.');
vscode.window.showErrorMessage(noAuthAvailable);
return { canceled: true };
}
@@ -144,7 +145,7 @@ export class AzureAccountProvider implements azdata.AccountProvider, vscode.Disp
const pick = await vscode.window.showQuickPick(options, { canPickMany: false });
if (!pick) {
console.log('No auth method was selected.');
Logger.log('No auth method was selected.');
vscode.window.showErrorMessage(noAuthSelected);
return { canceled: true };
}