Skip to content

Commit 15838c6

Browse files
JustinGroteandyleejordan
authored andcommitted
Initial Cleanup of Logging, looks good ATM
1 parent f8e11f0 commit 15838c6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const documentSelector: DocumentSelector = [
4343
];
4444

4545
export async function activate(context: vscode.ExtensionContext): Promise<IPowerShellExtensionClient> {
46-
logger = new Logger(context.logUri);
46+
logger = new Logger();
4747

4848
telemetryReporter = new TelemetryReporter(TELEMETRY_KEY);
4949

src/session.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import path = require("path");
66
import vscode = require("vscode");
77
import TelemetryReporter, { TelemetryEventProperties, TelemetryEventMeasurements } from "@vscode/extension-telemetry";
88
import { Message, Trace } from "vscode-jsonrpc";
9-
import { ILogger } from "./logging";
9+
import { ILogger, LanguageClientOutputChannelAdapter, LanguageClientTraceFormatter } from "./logging";
1010
import { PowerShellProcess } from "./process";
1111
import { Settings, changeSetting, getSettings, getEffectiveConfigurationTarget, validateCwdSetting } from "./settings";
1212
import utils = require("./utils");
@@ -338,7 +338,6 @@ export class SessionManager implements Middleware {
338338
// handler when the process is disposed).
339339
this.debugSessionProcess?.dispose();
340340
this.debugEventHandler?.dispose();
341-
342341
if (this.PowerShellExeDetails === undefined) {
343342
return Promise.reject(new Error("Required PowerShellExeDetails undefined!"));
344343
}
@@ -689,8 +688,8 @@ export class SessionManager implements Middleware {
689688
},
690689
},
691690
middleware: this,
692-
// traceOutputChannel: traceOutputChannel,
693-
// outputChannel: outputChannel,
691+
traceOutputChannel: new LanguageClientTraceFormatter("PowerShell: Trace LSP"),
692+
outputChannel: new LanguageClientOutputChannelAdapter("PowerShell: Editor Services"),
694693
revealOutputChannelOn: RevealOutputChannelOn.Never
695694
};
696695

0 commit comments

Comments
 (0)