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

Commit d2753f9

Browse files
committed
replaced log with tracing
1 parent 5addb13 commit d2753f9

File tree

96 files changed

+109
-104
lines changed

Some content is hidden

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

96 files changed

+109
-104
lines changed

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 = { package = "tracing", version = "0.1" }
14+
tracing = "0.1"
1515
rustc_span = { path = "../librustc_span" }
1616
rustc_data_structures = { path = "../librustc_data_structures" }
1717
rustc_index = { path = "../librustc_index" }

src/librustc_ast/util/literal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use rustc_lexer::unescape::{unescape_byte_literal, unescape_literal, Mode};
1010
use rustc_span::symbol::{kw, sym, Symbol};
1111
use rustc_span::Span;
1212

13-
use log::debug;
1413
use std::ascii;
14+
use tracing::debug;
1515

1616
pub enum LitError {
1717
NotLiteral,

src/librustc_driver/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ crate-type = ["dylib"]
1212
[dependencies]
1313
lazy_static = "1.0"
1414
libc = "0.2"
15-
log = { package = "tracing", version = "0.1.18", features = ["release_max_level_info"] }
15+
tracing = { version = "0.1.18", features = ["release_max_level_info"] }
1616
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" }

src/librustc_driver/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![recursion_limit = "256"]
1010

1111
#[macro_use]
12-
extern crate log;
12+
extern crate tracing;
1313
#[macro_use]
1414
extern crate lazy_static;
1515

@@ -1224,13 +1224,13 @@ pub fn install_ice_hook() {
12241224
}
12251225

12261226
/// This allows tools to enable rust logging without having to magically match rustc's
1227-
/// log crate version.
1227+
/// tracing crate version.
12281228
pub fn init_rustc_env_logger() {
12291229
init_env_logger("RUSTC_LOG")
12301230
}
12311231

12321232
/// This allows tools to enable rust logging without having to magically match rustc's
1233-
/// log crate version. In contrast to `init_rustc_env_logger` it allows you to choose an env var
1233+
/// tracing crate version. In contrast to `init_rustc_env_logger` it allows you to choose an env var
12341234
/// other than `RUSTC_LOG`.
12351235
pub fn init_env_logger(env: &str) {
12361236
// Don't register a dispatcher if there's no filter to print anything

src/librustc_errors/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 = { package = "tracing", version = "0.1" }
13+
tracing = "0.1"
1414
rustc_serialize = { path = "../librustc_serialize" }
1515
rustc_span = { path = "../librustc_span" }
1616
rustc_macros = { path = "../librustc_macros" }

src/librustc_errors/diagnostic_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use crate::{Applicability, Handler, Level, StashKey};
22
use crate::{Diagnostic, DiagnosticId, DiagnosticStyledString};
33

4-
use log::debug;
54
use rustc_span::{MultiSpan, Span};
65
use std::fmt::{self, Debug};
76
use std::ops::{Deref, DerefMut};
87
use std::thread::panicking;
8+
use tracing::debug;
99

1010
/// Used for emitting structured error messages and other diagnostic information.
1111
///

src/librustc_errors/emitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use crate::{
1818
pluralize, CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SuggestionStyle,
1919
};
2020

21-
use log::*;
2221
use rustc_data_structures::fx::FxHashMap;
2322
use rustc_data_structures::sync::Lrc;
2423
use rustc_span::hygiene::{ExpnKind, MacroKind};
@@ -30,6 +29,7 @@ use std::iter;
3029
use std::path::Path;
3130
use termcolor::{Ansi, BufferWriter, ColorChoice, ColorSpec, StandardStream};
3231
use termcolor::{Buffer, Color, WriteColor};
32+
use tracing::*;
3333

3434
/// Default column width, used in tests and when terminal dimensions cannot be determined.
3535
const DEFAULT_COLUMN_WIDTH: usize = 140;

src/librustc_errors/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ extern crate rustc_macros;
1111

1212
pub use emitter::ColorConfig;
1313

14-
use log::debug;
14+
use tracing::debug;
1515
use Level::*;
1616

1717
use emitter::{is_case_difference, Emitter, EmitterWriter};

src/librustc_expand/Cargo.toml

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

1313
[dependencies]
1414
rustc_serialize = { path = "../librustc_serialize" }
15-
log = { package = "tracing", version = "0.1" }
15+
tracing = "0.1"
1616
rustc_span = { path = "../librustc_span" }
1717
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
1818
rustc_ast_passes = { path = "../librustc_ast_passes" }

src/librustc_expand/mbe/macro_rules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ use rustc_span::hygiene::Transparency;
2525
use rustc_span::symbol::{kw, sym, Ident, MacroRulesNormalizedIdent};
2626
use rustc_span::Span;
2727

28-
use log::debug;
2928
use std::borrow::Cow;
3029
use std::collections::hash_map::Entry;
3130
use std::{mem, slice};
31+
use tracing::debug;
3232

3333
crate struct ParserAnyMacro<'a> {
3434
parser: Parser<'a>,

0 commit comments

Comments
 (0)