diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-07-24 20:42:00 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-07-31 22:38:20 +0200 |
| commit | ec7230fea2f4a96a1993c54bf2b17892d2e978b4 (patch) | |
| tree | 4761e206797c576bfbde450aa2b0f338ce298f8a /src | |
| parent | 6e87bacd37539b7e7cd75152dffd225047fa983a (diff) | |
| download | rust-ec7230fea2f4a96a1993c54bf2b17892d2e978b4.tar.gz rust-ec7230fea2f4a96a1993c54bf2b17892d2e978b4.zip | |
Move from `log` to `tracing`
Diffstat (limited to 'src')
37 files changed, 42 insertions, 39 deletions
diff --git a/src/librustc_ast/Cargo.toml b/src/librustc_ast/Cargo.toml index 6bd65fd5f96..a36f49bd414 100644 --- a/src/librustc_ast/Cargo.toml +++ b/src/librustc_ast/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_serialize = { path = "../librustc_serialize" } -log = "0.4" +log = { package = "tracing", version = "0.1" } scoped-tls = "1.0" rustc_span = { path = "../librustc_span" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_ast_lowering/Cargo.toml b/src/librustc_ast_lowering/Cargo.toml index d71eb4fcd5c..51f34a1b78e 100644 --- a/src/librustc_ast_lowering/Cargo.toml +++ b/src/librustc_ast_lowering/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_arena = { path = "../librustc_arena" } -log = { version = "0.4", features = ["release_max_level_info", "std"] } +log = { package = "tracing", version = "0.1" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_hir = { path = "../librustc_hir" } rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_ast_passes/Cargo.toml b/src/librustc_ast_passes/Cargo.toml index e4d1d79abb2..c53089a4afc 100644 --- a/src/librustc_ast_passes/Cargo.toml +++ b/src/librustc_ast_passes/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] itertools = "0.8" -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_ast_pretty/Cargo.toml b/src/librustc_ast_pretty/Cargo.toml index 6c076d2c5b8..4035346d354 100644 --- a/src/librustc_ast_pretty/Cargo.toml +++ b/src/librustc_ast_pretty/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_span = { path = "../librustc_span" } rustc_ast = { path = "../librustc_ast" } rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_builtin_macros/Cargo.toml b/src/librustc_builtin_macros/Cargo.toml index fdb6c359052..c612781153e 100644 --- a/src/librustc_builtin_macros/Cargo.toml +++ b/src/librustc_builtin_macros/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_parse_format = { path = "../librustc_parse_format" } -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_codegen_llvm/Cargo.toml b/src/librustc_codegen_llvm/Cargo.toml index bedefcc30ed..ec4dfabdcc2 100644 --- a/src/librustc_codegen_llvm/Cargo.toml +++ b/src/librustc_codegen_llvm/Cargo.toml @@ -15,7 +15,7 @@ bitflags = "1.0" flate2 = "1.0" libc = "0.2" measureme = "0.7.1" -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc-demangle = "0.1" rustc_attr = { path = "../librustc_attr" } diff --git a/src/librustc_codegen_ssa/Cargo.toml b/src/librustc_codegen_ssa/Cargo.toml index e100e0095c9..8fa0de37648 100644 --- a/src/librustc_codegen_ssa/Cargo.toml +++ b/src/librustc_codegen_ssa/Cargo.toml @@ -14,7 +14,7 @@ bitflags = "1.2.1" cc = "1.0.1" num_cpus = "1.0" memmap = "0.7" -log = "0.4.5" +log = { package = "tracing", version = "0.1" } libc = "0.2.50" jobserver = "0.1.11" tempfile = "3.1" diff --git a/src/librustc_data_structures/Cargo.toml b/src/librustc_data_structures/Cargo.toml index 1c2fb90b2d8..811d1e49626 100644 --- a/src/librustc_data_structures/Cargo.toml +++ b/src/librustc_data_structures/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] ena = "0.14" indexmap = "1" -log = "0.4" +log = { package = "tracing", version = "0.1" } jobserver_crate = { version = "0.1.13", package = "jobserver" } lazy_static = "1" once_cell = { version = "1", features = ["parking_lot"] } diff --git a/src/librustc_driver/Cargo.toml b/src/librustc_driver/Cargo.toml index 75d65920766..69dd221ef96 100644 --- a/src/librustc_driver/Cargo.toml +++ b/src/librustc_driver/Cargo.toml @@ -12,8 +12,8 @@ crate-type = ["dylib"] [dependencies] lazy_static = "1.0" libc = "0.2" -log = "0.4" -env_logger = { version = "0.7", default-features = false } +log = { package = "tracing", version = "0.1.18", features = ["release_max_level_info"] } +tracing-subscriber = { version = "0.2.10", features = ["fmt", "env-filter"] } rustc_middle = { path = "../librustc_middle" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index ab4eac9440b..6faffae305d 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -1226,7 +1226,11 @@ pub fn install_ice_hook() { /// This allows tools to enable rust logging without having to magically match rustc's /// log crate version pub fn init_rustc_env_logger() { - env_logger::init_from_env("RUSTC_LOG"); + let builder = tracing_subscriber::FmtSubscriber::builder(); + + let builder = builder.with_env_filter(tracing_subscriber::EnvFilter::from_env("RUSTC_LOG")); + + builder.init() } pub fn main() -> ! { diff --git a/src/librustc_errors/Cargo.toml b/src/librustc_errors/Cargo.toml index 7f72161aff8..d0f04c3fe76 100644 --- a/src/librustc_errors/Cargo.toml +++ b/src/librustc_errors/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_serialize = { path = "../librustc_serialize" } rustc_span = { path = "../librustc_span" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_expand/Cargo.toml b/src/librustc_expand/Cargo.toml index ef617acfe13..bdf039c36ab 100644 --- a/src/librustc_expand/Cargo.toml +++ b/src/librustc_expand/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] rustc_serialize = { path = "../librustc_serialize" } -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_span = { path = "../librustc_span" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_ast_passes = { path = "../librustc_ast_passes" } diff --git a/src/librustc_hir/Cargo.toml b/src/librustc_hir/Cargo.toml index 1b91d769c70..4a404e176e1 100644 --- a/src/librustc_hir/Cargo.toml +++ b/src/librustc_hir/Cargo.toml @@ -18,5 +18,5 @@ rustc_span = { path = "../librustc_span" } rustc_serialize = { path = "../librustc_serialize" } rustc_ast = { path = "../librustc_ast" } lazy_static = "1" -log = { version = "0.4", features = ["release_max_level_info", "std"] } +log = { package = "tracing", version = "0.1" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } diff --git a/src/librustc_incremental/Cargo.toml b/src/librustc_incremental/Cargo.toml index 7b3030fa1d9..60a87078d63 100644 --- a/src/librustc_incremental/Cargo.toml +++ b/src/librustc_incremental/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_graphviz = { path = "../librustc_graphviz" } -log = "0.4" +log = { package = "tracing", version = "0.1" } rand = "0.7" rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_infer/Cargo.toml b/src/librustc_infer/Cargo.toml index 06fc7ecf95f..9d56fa223a9 100644 --- a/src/librustc_infer/Cargo.toml +++ b/src/librustc_infer/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_graphviz = { path = "../librustc_graphviz" } -log = { version = "0.4", features = ["release_max_level_info", "std"] } +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml index 112dc7037f5..5c7edc10dd5 100644 --- a/src/librustc_interface/Cargo.toml +++ b/src/librustc_interface/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] libc = "0.2" -log = "0.4" +log = { package = "tracing", version = "0.1" } rayon = { version = "0.3.0", package = "rustc-rayon" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } rustc_ast = { path = "../librustc_ast" } diff --git a/src/librustc_lint/Cargo.toml b/src/librustc_lint/Cargo.toml index 58c15257326..3ba1566023d 100644 --- a/src/librustc_lint/Cargo.toml +++ b/src/librustc_lint/Cargo.toml @@ -9,7 +9,7 @@ name = "rustc_lint" path = "lib.rs" [dependencies] -log = "0.4" +log = { package = "tracing", version = "0.1" } unicode-security = "0.0.5" rustc_middle = { path = "../librustc_middle" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } diff --git a/src/librustc_metadata/Cargo.toml b/src/librustc_metadata/Cargo.toml index 7bbe7567d29..2c0e2aa39fd 100644 --- a/src/librustc_metadata/Cargo.toml +++ b/src/librustc_metadata/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] flate2 = "1.0" libc = "0.2" -log = "0.4" +log = { package = "tracing", version = "0.1" } memmap = "0.7" smallvec = { version = "1.0", features = ["union", "may_dangle"] } rustc_middle = { path = "../librustc_middle" } diff --git a/src/librustc_middle/Cargo.toml b/src/librustc_middle/Cargo.toml index 02d82c67933..678fcfe6539 100644 --- a/src/librustc_middle/Cargo.toml +++ b/src/librustc_middle/Cargo.toml @@ -13,7 +13,7 @@ doctest = false rustc_arena = { path = "../librustc_arena" } bitflags = "1.2.1" scoped-tls = "1.0" -log = { version = "0.4", features = ["release_max_level_info", "std"] } +log = { package = "tracing", version = "0.1" } rustc-rayon-core = "0.3.0" polonius-engine = "0.12.0" rustc_apfloat = { path = "../librustc_apfloat" } diff --git a/src/librustc_mir/Cargo.toml b/src/librustc_mir/Cargo.toml index aebce78e401..f05c47e0ed6 100644 --- a/src/librustc_mir/Cargo.toml +++ b/src/librustc_mir/Cargo.toml @@ -13,7 +13,7 @@ doctest = false either = "1.5.0" rustc_graphviz = { path = "../librustc_graphviz" } itertools = "0.8" -log = "0.4" +log = { package = "tracing", version = "0.1" } log_settings = "0.1.1" polonius-engine = "0.12.0" rustc_middle = { path = "../librustc_middle" } diff --git a/src/librustc_mir/interpret/eval_context.rs b/src/librustc_mir/interpret/eval_context.rs index 630b2890835..879a8e64490 100644 --- a/src/librustc_mir/interpret/eval_context.rs +++ b/src/librustc_mir/interpret/eval_context.rs @@ -818,11 +818,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { ) -> InterpResult<'tcx> { // FIXME: should we tell the user that there was a local which was never written to? if let LocalValue::Live(Operand::Indirect(MemPlace { ptr, .. })) = local { - trace!("deallocating local"); // All locals have a backing allocation, even if the allocation is empty // due to the local having ZST type. let ptr = ptr.assert_ptr(); - trace!("{:?}", self.memory.dump_alloc(ptr.alloc_id)); + trace!("deallocating local: {:?}", self.memory.dump_alloc(ptr.alloc_id)); self.memory.deallocate_local(ptr)?; }; Ok(()) diff --git a/src/librustc_mir_build/Cargo.toml b/src/librustc_mir_build/Cargo.toml index 401a5009e3c..96059fa43e5 100644 --- a/src/librustc_mir_build/Cargo.toml +++ b/src/librustc_mir_build/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_arena = { path = "../librustc_arena" } -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc_apfloat = { path = "../librustc_apfloat" } rustc_attr = { path = "../librustc_attr" } diff --git a/src/librustc_parse/Cargo.toml b/src/librustc_parse/Cargo.toml index 7164c678808..f214ec020cb 100644 --- a/src/librustc_parse/Cargo.toml +++ b/src/librustc_parse/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] bitflags = "1.0" -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_feature = { path = "../librustc_feature" } diff --git a/src/librustc_passes/Cargo.toml b/src/librustc_passes/Cargo.toml index 69048cbf24a..d9fa435e3ad 100644 --- a/src/librustc_passes/Cargo.toml +++ b/src/librustc_passes/Cargo.toml @@ -9,7 +9,7 @@ name = "rustc_passes" path = "lib.rs" [dependencies] -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_privacy/Cargo.toml b/src/librustc_privacy/Cargo.toml index 6110d2ef7fc..6f543e71b42 100644 --- a/src/librustc_privacy/Cargo.toml +++ b/src/librustc_privacy/Cargo.toml @@ -17,4 +17,4 @@ rustc_typeck = { path = "../librustc_typeck" } rustc_session = { path = "../librustc_session" } rustc_span = { path = "../librustc_span" } rustc_data_structures = { path = "../librustc_data_structures" } -log = "0.4" +log = { package = "tracing", version = "0.1" } diff --git a/src/librustc_query_system/Cargo.toml b/src/librustc_query_system/Cargo.toml index 73d50f84fe8..64af9c5f1a1 100644 --- a/src/librustc_query_system/Cargo.toml +++ b/src/librustc_query_system/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_arena = { path = "../librustc_arena" } -log = { version = "0.4", features = ["release_max_level_info", "std"] } +log = { package = "tracing", version = "0.1" } rustc-rayon-core = "0.3.0" rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_resolve/Cargo.toml b/src/librustc_resolve/Cargo.toml index 6f6104c3d69..1cb49132ead 100644 --- a/src/librustc_resolve/Cargo.toml +++ b/src/librustc_resolve/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] bitflags = "1.2.1" -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_ast = { path = "../librustc_ast" } rustc_arena = { path = "../librustc_arena" } rustc_middle = { path = "../librustc_middle" } diff --git a/src/librustc_save_analysis/Cargo.toml b/src/librustc_save_analysis/Cargo.toml index 5948c88054d..7a5ae0ace3a 100644 --- a/src/librustc_save_analysis/Cargo.toml +++ b/src/librustc_save_analysis/Cargo.toml @@ -9,7 +9,7 @@ name = "rustc_save_analysis" path = "lib.rs" [dependencies] -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc_ast = { path = "../librustc_ast" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } diff --git a/src/librustc_session/Cargo.toml b/src/librustc_session/Cargo.toml index abce7359c0e..35c227df850 100644 --- a/src/librustc_session/Cargo.toml +++ b/src/librustc_session/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] bitflags = "1.2.1" getopts = "0.2" -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_errors = { path = "../librustc_errors" } rustc_feature = { path = "../librustc_feature" } rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_span/Cargo.toml b/src/librustc_span/Cargo.toml index 2a7a7748725..2db417ce0e1 100644 --- a/src/librustc_span/Cargo.toml +++ b/src/librustc_span/Cargo.toml @@ -18,6 +18,6 @@ rustc_arena = { path = "../librustc_arena" } scoped-tls = "1.0" unicode-width = "0.1.4" cfg-if = "0.1.2" -log = "0.4" +log = { package = "tracing", version = "0.1" } sha-1 = "0.8" md-5 = "0.8" diff --git a/src/librustc_symbol_mangling/Cargo.toml b/src/librustc_symbol_mangling/Cargo.toml index d670ababe9f..757d86bd95a 100644 --- a/src/librustc_symbol_mangling/Cargo.toml +++ b/src/librustc_symbol_mangling/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -log = "0.4" +log = { package = "tracing", version = "0.1" } punycode = "0.4.0" rustc-demangle = "0.1.16" diff --git a/src/librustc_target/Cargo.toml b/src/librustc_target/Cargo.toml index c73490e4513..21796e84985 100644 --- a/src/librustc_target/Cargo.toml +++ b/src/librustc_target/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] bitflags = "1.2.1" -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_macros = { path = "../librustc_macros" } rustc_serialize = { path = "../librustc_serialize" } diff --git a/src/librustc_trait_selection/Cargo.toml b/src/librustc_trait_selection/Cargo.toml index fd11a85a9c4..c43fe3f2c0c 100644 --- a/src/librustc_trait_selection/Cargo.toml +++ b/src/librustc_trait_selection/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_parse_format = { path = "../librustc_parse_format" } -log = { version = "0.4", features = ["release_max_level_info", "std"] } +log = { package = "tracing", version = "0.1" } rustc_attr = { path = "../librustc_attr" } rustc_middle = { path = "../librustc_middle" } rustc_ast = { path = "../librustc_ast" } diff --git a/src/librustc_traits/Cargo.toml b/src/librustc_traits/Cargo.toml index 079b9b10fd0..f8487982e3d 100644 --- a/src/librustc_traits/Cargo.toml +++ b/src/librustc_traits/Cargo.toml @@ -9,7 +9,7 @@ name = "rustc_traits" path = "lib.rs" [dependencies] -log = { version = "0.4" } +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_hir = { path = "../librustc_hir" } diff --git a/src/librustc_ty/Cargo.toml b/src/librustc_ty/Cargo.toml index b6db75e44f9..6cdb3530002 100644 --- a/src/librustc_ty/Cargo.toml +++ b/src/librustc_ty/Cargo.toml @@ -9,7 +9,7 @@ name = "rustc_ty" path = "lib.rs" [dependencies] -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_typeck/Cargo.toml b/src/librustc_typeck/Cargo.toml index 93b503c976b..963deda162d 100644 --- a/src/librustc_typeck/Cargo.toml +++ b/src/librustc_typeck/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] rustc_arena = { path = "../librustc_arena" } -log = "0.4" +log = { package = "tracing", version = "0.1" } rustc_middle = { path = "../librustc_middle" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml index 338a167de3f..bd4c5949800 100644 --- a/src/tools/compiletest/Cargo.toml +++ b/src/tools/compiletest/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" diff = "0.1.10" env_logger = { version = "0.7", default-features = false } getopts = "0.2" -log = "0.4" +log = { package = "tracing", version = "0.1" } regex = "1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" |
