Dispose logger on extension deactivation
This commit is contained in:
@@ -49,6 +49,8 @@ async function tryActivate(context: vscode.ExtensionContext) {
|
||||
);
|
||||
context.subscriptions.push(defaultOnEnter);
|
||||
|
||||
context.subscriptions.push(log);
|
||||
|
||||
const config = new Config(context);
|
||||
const state = new PersistentState(context.globalState);
|
||||
const serverPath = await bootstrap(config, state).catch(err => {
|
||||
|
||||
@@ -18,6 +18,10 @@ export const log = new class {
|
||||
private enabled = true;
|
||||
private readonly output = vscode.window.createOutputChannel("Rust Analyzer Client");
|
||||
|
||||
dispose() {
|
||||
log.output.dispose();
|
||||
}
|
||||
|
||||
setEnabled(yes: boolean): void {
|
||||
log.enabled = yes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user