summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml1
-rw-r--r--cli/util/logger.rs9
2 files changed, 10 insertions, 0 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 5055b3197..6034145a6 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -156,6 +156,7 @@ thiserror.workspace = true
tokio.workspace = true
tokio-util.workspace = true
tower-lsp.workspace = true
+tracing = { version = "0.1", features = ["log", "default"] }
twox-hash.workspace = true
typed-arena = "=2.0.2"
uuid = { workspace = true, features = ["serde"] }
diff --git a/cli/util/logger.rs b/cli/util/logger.rs
index f3510c502..4c185f6de 100644
--- a/cli/util/logger.rs
+++ b/cli/util/logger.rs
@@ -46,6 +46,15 @@ pub fn init(maybe_level: Option<log::Level>) {
// in the cli logger
.filter_module("deno::lsp::performance", log::LevelFilter::Debug)
.filter_module("rustls", log::LevelFilter::Off)
+ // swc_ecma_codegen's `srcmap!` macro emits error-level spans only on debug
+ // build:
+ // https://github.com/swc-project/swc/blob/74d6478be1eb8cdf1df096c360c159db64b64d8a/crates/swc_ecma_codegen/src/macros.rs#L112
+ // We suppress them here to avoid flooding our CI logs in integration tests.
+ .filter_module("swc_ecma_codegen", log::LevelFilter::Off)
+ .filter_module("swc_ecma_transforms_optimization", log::LevelFilter::Off)
+ .filter_module("swc_ecma_parser", log::LevelFilter::Error)
+ // Suppress span lifecycle logs since they are too verbose
+ .filter_module("tracing::span", log::LevelFilter::Off)
.format(|buf, record| {
let mut target = record.target().to_string();
if let Some(line_no) = record.line() {