From 6b826033a4d439cf9475723f0f21ede26e283208 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 9 Jun 2021 10:00:26 +1000 Subject: feat(lsp): add additional logging information (#10890) --- cli/lsp/language_server.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'cli/lsp/language_server.rs') diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index cd952b548..9d9e97e12 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -361,9 +361,13 @@ impl Inner { import_map_str )) }?; - let import_map_path = import_map_url - .to_file_path() - .map_err(|_| anyhow!("Bad file path."))?; + let import_map_path = import_map_url.to_file_path().map_err(|_| { + anyhow!("Cannot convert \"{}\" into a file path.", import_map_url) + })?; + info!( + " Resolved import map: \"{}\"", + import_map_path.to_string_lossy() + ); let import_map_json = fs::read_to_string(import_map_path).await.map_err(|err| { anyhow!( @@ -460,6 +464,7 @@ impl Inner { config_str )) }?; + info!(" Resolved configuration file: \"{}\"", config_url); let config_file = { let buffer = config_url @@ -527,6 +532,9 @@ impl Inner { env!("TARGET") ); info!(" version: {}", version); + if let Ok(path) = std::env::current_exe() { + info!(" executable: {}", path.to_string_lossy()); + } let server_info = ServerInfo { name: "deno-language-server".to_string(), -- cgit v1.2.3