mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-13 13:57:25 +00:00
Extract client-side logging
This commit is contained in:
parent
2cbe8a4c4b
commit
49844ab717
10 changed files with 51 additions and 21 deletions
|
@ -1,6 +1,7 @@
|
|||
import * as os from "os";
|
||||
import * as vscode from 'vscode';
|
||||
import { BinarySource } from "./installation/interfaces";
|
||||
import { log } from "./util";
|
||||
|
||||
const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG;
|
||||
|
||||
|
@ -46,7 +47,9 @@ export class Config {
|
|||
|
||||
private refreshConfig() {
|
||||
this.cfg = vscode.workspace.getConfiguration(Config.rootSection);
|
||||
console.log("Using configuration:", this.cfg);
|
||||
const enableLogging = this.cfg.get("trace.extension") as boolean;
|
||||
log.setEnabled(enableLogging);
|
||||
log.debug("Using configuration:", this.cfg);
|
||||
}
|
||||
|
||||
private async onConfigChange(event: vscode.ConfigurationChangeEvent) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue