mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 10:38:31 -05:00
* do a large cleanup of azurecore * Fix tests * Rework Device Code * Fix tests * Fix AE scenario * Fix firewall rule - clenaup logging * Shorthand syntax * Fix firewall tests * Start on tests for azureAuth * Add more tests * Address comments * Add a few more important tests * Don't throw error on old code * Fill in todo
33 lines
984 B
TypeScript
33 lines
984 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
export class Logger {
|
|
private static _piiLogging: boolean = false;
|
|
|
|
static log(msg: any, ...vals: any[]) {
|
|
const fullMessage = `${msg} - ${vals.map(v => JSON.stringify(v)).join(' - ')}`;
|
|
console.log(fullMessage);
|
|
}
|
|
|
|
static error(msg: any, ...vals: any[]) {
|
|
const fullMessage = `${msg} - ${vals.map(v => JSON.stringify(v)).join(' - ')}`;
|
|
console.error(fullMessage);
|
|
}
|
|
|
|
static pii(msg: any, ...vals: any[]) {
|
|
if (this.piiLogging) {
|
|
Logger.log(msg, vals);
|
|
}
|
|
}
|
|
|
|
public static set piiLogging(val: boolean) {
|
|
this._piiLogging = val;
|
|
}
|
|
|
|
public static get piiLogging(): boolean {
|
|
return this._piiLogging;
|
|
}
|
|
}
|