Skip to content

Commit

Permalink
chore: add more logs for #3839
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc3 committed Sep 13, 2024
1 parent 2dd0e8b commit 9261b75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/biome_service/src/file_handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl From<&Path> for DocumentFileSource {
}

impl DocumentFileSource {
#[instrument(level = "debug")]
#[instrument(level = "debug", fields(result))]
fn try_from_well_known(path: &Path) -> Result<Self, FileSourceError> {
if let Ok(file_source) = JsonFileSource::try_from_well_known(path) {
return Ok(file_source.into());
Expand All @@ -130,7 +130,7 @@ impl DocumentFileSource {
.map_or(DocumentFileSource::Unknown, |file_source| file_source)
}

#[instrument(level = "debug")]
#[instrument(level = "debug", fields(result))]
fn try_from_extension(extension: &OsStr) -> Result<Self, FileSourceError> {
if let Ok(file_source) = JsonFileSource::try_from_extension(extension) {
return Ok(file_source.into());
Expand All @@ -156,7 +156,7 @@ impl DocumentFileSource {
.map_or(DocumentFileSource::Unknown, |file_source| file_source)
}

#[instrument(level = "debug")]
#[instrument(level = "debug", fields(result))]
fn try_from_language_id(language_id: &str) -> Result<Self, FileSourceError> {
if let Ok(file_source) = JsonFileSource::try_from_language_id(language_id) {
return Ok(file_source.into());
Expand Down Expand Up @@ -187,7 +187,7 @@ impl DocumentFileSource {
.map_or(DocumentFileSource::Unknown, |file_source| file_source)
}

#[instrument(level = "debug")]
#[instrument(level = "debug", fields(result))]
fn try_from_path(path: &Path) -> Result<Self, FileSourceError> {
if let Ok(file_source) = Self::try_from_well_known(path) {
return Ok(file_source);
Expand Down

0 comments on commit 9261b75

Please sign in to comment.