Add config for enabling STS communication logging (#21591)

* Add config for enabling STS communication logging

* Add warning to description
This commit is contained in:
Charles Gagnon
2023-01-13 14:49:49 -08:00
committed by GitHub
parent ce5cb32084
commit d51273d9cf
3 changed files with 14 additions and 24 deletions

View File

@@ -150,6 +150,17 @@
"Verbose"
]
},
"mssql.trace.server": {
"type": "string",
"scope": "window",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "%mssql.tracing.desc%"
},
"mssql.logRetentionMinutes": {
"type": "number",
"default": 10080,

View File

@@ -65,6 +65,7 @@
"mssql.query.ansiWarnings": "Enable SET ANSI_WARNINGS",
"mssql.query.ansiNulls": "Enable SET ANSI_NULLS",
"mssql.query.alwaysEncryptedParameterization": "Enable Parameterization for Always Encrypted",
"mssql.tracing.desc": "Traces the communication between Azure Data Studio and SQL Tools Service to the SQL Tools Service output channel. WARNING: This may include sensitive information when verbose logging is enabled.",
"mssql.ignorePlatformWarning": "[Optional] Do not show unsupported platform warnings",
"onprem.databaseProperties.recoveryModel": "Recovery Model",

View File

@@ -58,7 +58,7 @@ export class SqlToolsServer {
const installationComplete = Date.now();
let serverOptions = await generateServerOptions(context.extensionContext.logPath, serverPath);
let clientOptions = getClientOptions(context);
this.client = new SqlOpsDataClient(Constants.serviceName, serverOptions, clientOptions);
this.client = new SqlOpsDataClient('mssql', Constants.serviceName, serverOptions, clientOptions);
const processStart = Date.now();
const clientReadyPromise = this.client.onReady().then(() => {
const processEnd = Date.now();
@@ -196,28 +196,6 @@ function getClientOptions(context: AppContext): ClientOptions {
ExecutionPlanServiceFeature,
TdeMigrationService.asFeature(context),
],
outputChannel: new CustomOutputChannel()
outputChannel: outputChannel
};
}
class CustomOutputChannel implements vscode.OutputChannel {
name: string;
append(value: string): void {
console.log(value);
}
appendLine(value: string): void {
console.log(value);
}
clear(): void {
}
show(preserveFocus?: boolean): void;
show(column?: vscode.ViewColumn, preserveFocus?: boolean): void;
show(column?: any, preserveFocus?: any) {
}
hide(): void {
}
dispose(): void {
}
replace(_value: string): void {
}
}