Skip to content

Commit

Permalink
chore: 🤖 add some useful info
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed Jan 6, 2024
1 parent 0c56450 commit 4d90f5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
Expand Down
5 changes: 3 additions & 2 deletions crates/oxc_language_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion editors/vscode/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export async function activate(context: ExtensionContext) {
options: {
env: {
...process.env,
RUST_LOG: "debug",
RUST_LOG: process.env.RUST_LOG || "info",
},
},
};
Expand Down

0 comments on commit 4d90f5e

Please sign in to comment.