Skip to content

Commit feffe48

Browse files
committed
feat(oxfmt): trace which files are being formatted via OXC_LOG=debug (#16627)
closes #16607
1 parent 14d803a commit feffe48

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Cargo.lock

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ tempfile = "3.23.0" # Temporary files
228228
tokio = { version = "1.48.0", default-features = false } # Async runtime
229229
toml = { version = "0.9.8" }
230230
tower-lsp-server = "0.23.0" # LSP server framework
231+
tracing = "0.1.43"
231232
tracing-subscriber = "0.3.20" # Tracing implementation
232233
ureq = { version = "3.1.4", default-features = false } # HTTP client
233234
url = { version = "2.5.7" } # URL parsing

apps/oxfmt/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ rayon = { workspace = true }
4444
serde_json = { workspace = true }
4545
simdutf8 = { workspace = true }
4646
tokio = { workspace = true, features = ["rt-multi-thread", "io-std", "macros"] }
47+
tracing = { workspace = true }
4748
tracing-subscriber = { workspace = true, features = [] } # Omit the `regex` feature
4849

4950
# NAPI dependencies (conditional on napi feature)

apps/oxfmt/src/cli/service.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ impl FormatService {
5757
return;
5858
};
5959

60+
tracing::debug!("Format {}", path.strip_prefix(&self.cwd).unwrap().display());
6061
let (code, is_changed) = match self.formatter.format(&entry, &source_text) {
6162
FormatResult::Success { code, is_changed } => (code, is_changed),
6263
FormatResult::Error(diagnostics) => {

0 commit comments

Comments
 (0)