From 4d90f5ec4d4a355713b28894232b5f14881b07cd Mon Sep 17 00:00:00 2001 From: IWANABETHATGUY Date: Sat, 6 Jan 2024 21:39:04 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20some=20useful=20i?= =?UTF-8?q?nfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 3 ++- crates/oxc_language_server/src/main.rs | 5 +++-- editors/vscode/client/extension.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 9d64c1ec6605b..f98a979a51498 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,8 @@ "sourceMaps": true, "outFiles": ["${workspaceFolder}/editors/vscode/dist/*.js"], "env": { - "SERVER_PATH_DEV": "${workspaceRoot}/target/debug/oxc_language_server" + "SERVER_PATH_DEV": "${workspaceRoot}/target/debug/oxc_language_server", + "RUST_LOG": "debug" } } ] diff --git a/crates/oxc_language_server/src/main.rs b/crates/oxc_language_server/src/main.rs index 23277e33a66d8..5052b5c7a466b 100644 --- a/crates/oxc_language_server/src/main.rs +++ b/crates/oxc_language_server/src/main.rs @@ -6,7 +6,7 @@ mod walk; use crate::linter::{DiagnosticReport, ServerLinter}; use globset::Glob; use ignore::gitignore::Gitignore; -use log::{debug, error}; +use log::{debug, error, info}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fmt::Debug; @@ -87,7 +87,8 @@ impl LanguageServer for Backend { }); if let Some(value) = options { - debug!("initialize: {:?}", value); + info!("initialize: {:?}", value); + info!("language server version: {:?}", env!("CARGO_PKG_VERSION")); *self.options.lock().await = value; } Ok(InitializeResult { diff --git a/editors/vscode/client/extension.ts b/editors/vscode/client/extension.ts index 23e18dfe420f9..17e55d94c2b68 100644 --- a/editors/vscode/client/extension.ts +++ b/editors/vscode/client/extension.ts @@ -105,7 +105,7 @@ export async function activate(context: ExtensionContext) { options: { env: { ...process.env, - RUST_LOG: "debug", + RUST_LOG: process.env.RUST_LOG || "info", }, }, };