about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-10-20 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-10-20 00:00:00 +0000
commit08d5e9673677d5874484b2f9837a42db9fea9331 (patch)
treeb6c04840a823338fb6cb117e37b58456c072f05f
parent554633534c550d20715e5e1576702b1f035586ad (diff)
downloadrust-08d5e9673677d5874484b2f9837a42db9fea9331.tar.gz
rust-08d5e9673677d5874484b2f9837a42db9fea9331.zip
Initialize tracing subscriber in compiletest tool
The logging in compiletest was migrated from log crate to a tracing, but
the initialization code was never changed, so logging is non-functional.

Initialize tracing subscriber using default settings.
-rw-r--r--Cargo.lock2
-rw-r--r--src/tools/compiletest/Cargo.toml2
-rw-r--r--src/tools/compiletest/src/main.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0d2170a9927..722632e53c7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -639,7 +639,6 @@ name = "compiletest"
 version = "0.0.0"
 dependencies = [
  "diff",
- "env_logger 0.7.1",
  "getopts",
  "glob",
  "lazy_static",
@@ -650,6 +649,7 @@ dependencies = [
  "serde",
  "serde_json",
  "tracing",
+ "tracing-subscriber",
  "walkdir",
  "winapi 0.3.9",
 ]
diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml
index c601084d119..209254a5d5e 100644
--- a/src/tools/compiletest/Cargo.toml
+++ b/src/tools/compiletest/Cargo.toml
@@ -6,9 +6,9 @@ edition = "2018"
 
 [dependencies]
 diff = "0.1.10"
-env_logger = { version = "0.7", default-features = false }
 getopts = "0.2"
 tracing = "0.1"
+tracing-subscriber = { version = "0.2.13", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
 regex = "1.0"
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 190a9c62210..2b2a6cfa8bd 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -35,7 +35,7 @@ pub mod runtest;
 pub mod util;
 
 fn main() {
-    env_logger::init();
+    tracing_subscriber::fmt::init();
 
     let config = parse_config(env::args().collect());