Add warning message when pii logging enabled (#22533)

* add warning message when pii logging enabled

* fix typo

* Update extensions/azurecore/src/localizedConstants.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* update warning message

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Christopher Suh
2023-03-30 14:44:25 -07:00
committed by GitHub
parent 92f9b11012
commit 2e1689b44d
3 changed files with 15 additions and 1 deletions

View File

@@ -97,6 +97,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<azurec
const authLibrary: string = vscode.workspace.getConfiguration(Constants.AzureSection).get(Constants.AuthenticationLibrarySection)
?? Constants.DefaultAuthLibrary;
const piiLogging = vscode.workspace.getConfiguration(Constants.AzureSection).get(Constants.piiLogging, false)
if (piiLogging) {
void vscode.window.showWarningMessage(loc.piiWarning, loc.disable, loc.dismiss).then(async (value) => {
if (value === loc.disable) {
await vscode.workspace.getConfiguration(Constants.AzureSection).update(Constants.piiLogging, false, vscode.ConfigurationTarget.Global);
}
});
}
updatePiiLoggingLevel();
let eventEmitter: vscode.EventEmitter<azurecore.CacheEncryptionKeys>;