mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
feat: use vscode log format for client logs
This change updates the log format to use the vscode log format instead of the custom log format, by replacing the `OutputChannel` with a `LogOutputChannel` and using the `debug`, `info`, `warn`, and `error` methods on it. This has the following benefits: - Each log level now has its own color and the timestamp is in a more standard format - Inspect output (e.g. the log of the config object) is now colored - Error stack traces are now shown in the output - The log level is now controlled on the output tab by clicking the gear icon and selecting "Debug" or by passing the `--log` parameter to vscode. The `trace.extension` setting has been marked as deprecated.
This commit is contained in:
parent
a46788318c
commit
45a881313a
6 changed files with 44 additions and 46 deletions
|
@ -41,7 +41,6 @@ export class Config {
|
|||
}
|
||||
|
||||
private refreshLogging() {
|
||||
log.setEnabled(this.traceExtension ?? false);
|
||||
log.info(
|
||||
"Extension version:",
|
||||
vscode.extensions.getExtension(this.extensionId)!.packageJSON.version,
|
||||
|
@ -253,10 +252,6 @@ export class Config {
|
|||
await this.cfg.update("checkOnSave", !(value || false), target || null, overrideInLanguage);
|
||||
}
|
||||
|
||||
get traceExtension() {
|
||||
return this.get<boolean>("trace.extension");
|
||||
}
|
||||
|
||||
get discoverProjectRunner(): string | undefined {
|
||||
return this.get<string | undefined>("discoverProjectRunner");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue