mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Dispose logger on extension deactivation
This commit is contained in:
parent
3602f07bbe
commit
13872543e0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user