File tree Expand file tree Collapse file tree 4 files changed +7
-0
lines changed Expand file tree Collapse file tree 4 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2183,6 +2183,7 @@ name = "rustc_errors"
2183
2183
version = " 0.0.0"
2184
2184
dependencies = [
2185
2185
" atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" ,
2186
+ " log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" ,
2186
2187
" rustc_cratesio_shim 0.0.0" ,
2187
2188
" rustc_data_structures 0.0.0" ,
2188
2189
" serialize 0.0.0" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ path = "lib.rs"
9
9
crate-type = [" dylib" ]
10
10
11
11
[dependencies ]
12
+ log = " 0.4"
12
13
serialize = { path = " ../libserialize" }
13
14
syntax_pos = { path = " ../libsyntax_pos" }
14
15
rustc_data_structures = { path = " ../librustc_data_structures" }
Original file line number Diff line number Diff line change @@ -108,6 +108,9 @@ impl<'a> DiagnosticBuilder<'a> {
108
108
diagnostic = :: std:: ptr:: read ( & self . diagnostic ) ;
109
109
:: std:: mem:: forget ( self ) ;
110
110
} ;
111
+ // Logging here is useful to help track down where in logs an error was
112
+ // actually emitted.
113
+ debug ! ( "buffer: diagnostic={:?}" , diagnostic) ;
111
114
buffered_diagnostics. push ( diagnostic) ;
112
115
}
113
116
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ extern crate atty;
23
23
extern crate termcolor;
24
24
#[ cfg( unix) ]
25
25
extern crate libc;
26
+ #[ macro_use]
27
+ extern crate log;
26
28
extern crate rustc_data_structures;
27
29
extern crate serialize as rustc_serialize;
28
30
extern crate syntax_pos;
You can’t perform that action at this time.
0 commit comments