Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 05762e3

Browse files
committed
Auto merge of rust-lang#74726 - oli-obk:tracing, r=Mark-Simulacrum
Move from `log` to `tracing` The only visible change is that we now get timestamps in our logs: ``` Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: skipping replace of Rvalue::Use(const () because it is already a const Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: propagated into _2 Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: visit_constant: const () ``` This PR was explicitly designed to be as low-impact as possible. We can now move to using the name `tracing` insteads of `log` on a crate-by-crate basis and use any of the other tracing features where desirable. As far as I can tell this will allow tools to seamlessly keep working (since they are using `rustc_driver::init_log...`). This is the first half of step 1 of the accepted `tracing` MCP (rust-lang/compiler-team#331)
2 parents de10abf + c729037 commit 05762e3

File tree

41 files changed

+161
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+161
-89
lines changed

Cargo.lock

Lines changed: 98 additions & 45 deletions
Large diffs are not rendered by default.

src/librustc_ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ doctest = false
1111

1212
[dependencies]
1313
rustc_serialize = { path = "../librustc_serialize" }
14-
log = "0.4"
14+
log = { package = "tracing", version = "0.1" }
1515
scoped-tls = "1.0"
1616
rustc_span = { path = "../librustc_span" }
1717
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc_ast_lowering/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ doctest = false
1111

1212
[dependencies]
1313
rustc_arena = { path = "../librustc_arena" }
14-
log = { version = "0.4", features = ["release_max_level_info", "std"] }
14+
log = { package = "tracing", version = "0.1" }
1515
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
1616
rustc_hir = { path = "../librustc_hir" }
1717
rustc_target = { path = "../librustc_target" }

src/librustc_ast_passes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010

1111
[dependencies]
1212
itertools = "0.8"
13-
log = "0.4"
13+
log = { package = "tracing", version = "0.1" }
1414
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
1515
rustc_attr = { path = "../librustc_attr" }
1616
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc_ast_pretty/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "lib.rs"
1010
doctest = false
1111

1212
[dependencies]
13-
log = "0.4"
13+
log = { package = "tracing", version = "0.1" }
1414
rustc_span = { path = "../librustc_span" }
1515
rustc_ast = { path = "../librustc_ast" }
1616
rustc_target = { path = "../librustc_target" }

src/librustc_builtin_macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ doctest = false
1111

1212
[dependencies]
1313
rustc_parse_format = { path = "../librustc_parse_format" }
14-
log = "0.4"
14+
log = { package = "tracing", version = "0.1" }
1515
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
1616
rustc_attr = { path = "../librustc_attr" }
1717
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc_codegen_llvm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ bitflags = "1.0"
1515
flate2 = "1.0"
1616
libc = "0.2"
1717
measureme = "0.7.1"
18-
log = "0.4"
18+
log = { package = "tracing", version = "0.1" }
1919
rustc_middle = { path = "../librustc_middle" }
2020
rustc-demangle = "0.1"
2121
rustc_attr = { path = "../librustc_attr" }

src/librustc_codegen_ssa/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ bitflags = "1.2.1"
1414
cc = "1.0.1"
1515
num_cpus = "1.0"
1616
memmap = "0.7"
17-
log = "0.4.5"
17+
log = { package = "tracing", version = "0.1" }
1818
libc = "0.2.50"
1919
jobserver = "0.1.11"
2020
tempfile = "3.1"

src/librustc_data_structures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ doctest = false
1212
[dependencies]
1313
ena = "0.14"
1414
indexmap = "1"
15-
log = "0.4"
15+
log = { package = "tracing", version = "0.1" }
1616
jobserver_crate = { version = "0.1.13", package = "jobserver" }
1717
lazy_static = "1"
1818
once_cell = { version = "1", features = ["parking_lot"] }

src/librustc_driver/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ crate-type = ["dylib"]
1212
[dependencies]
1313
lazy_static = "1.0"
1414
libc = "0.2"
15-
log = "0.4"
16-
env_logger = { version = "0.7", default-features = false }
15+
log = { package = "tracing", version = "0.1.18", features = ["release_max_level_info"] }
16+
tracing-subscriber = { version = "0.2.10", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
1717
rustc_middle = { path = "../librustc_middle" }
1818
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
1919
rustc_target = { path = "../librustc_target" }

0 commit comments

Comments
 (0)