From 0f1911afdb8320f0897036624d80c8654020b396 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Wed, 11 Sep 2024 18:53:41 -0400 Subject: [PATCH] chore: add additional debug logs for #3839 --- crates/biome_service/src/file_handlers/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/biome_service/src/file_handlers/mod.rs b/crates/biome_service/src/file_handlers/mod.rs index 375d27654376..466f606ad9d0 100644 --- a/crates/biome_service/src/file_handlers/mod.rs +++ b/crates/biome_service/src/file_handlers/mod.rs @@ -43,6 +43,7 @@ pub use javascript::JsFormatterSettings; use std::borrow::Cow; use std::ffi::OsStr; use std::path::Path; +use tracing::{debug, instrument}; mod astro; mod css; @@ -105,6 +106,7 @@ impl From<&Path> for DocumentFileSource { } impl DocumentFileSource { + #[instrument(level = "debug")] fn try_from_well_known(path: &Path) -> Result { if let Ok(file_source) = JsonFileSource::try_from_well_known(path) { return Ok(file_source.into()); @@ -128,6 +130,7 @@ impl DocumentFileSource { .map_or(DocumentFileSource::Unknown, |file_source| file_source) } + #[instrument(level = "debug")] fn try_from_extension(extension: &OsStr) -> Result { if let Ok(file_source) = JsonFileSource::try_from_extension(extension) { return Ok(file_source.into()); @@ -153,6 +156,7 @@ impl DocumentFileSource { .map_or(DocumentFileSource::Unknown, |file_source| file_source) } + #[instrument(level = "debug")] fn try_from_language_id(language_id: &str) -> Result { if let Ok(file_source) = JsonFileSource::try_from_language_id(language_id) { return Ok(file_source.into()); @@ -183,6 +187,7 @@ impl DocumentFileSource { .map_or(DocumentFileSource::Unknown, |file_source| file_source) } + #[instrument(level = "debug")] fn try_from_path(path: &Path) -> Result { if let Ok(file_source) = Self::try_from_well_known(path) { return Ok(file_source);