File tree 4 files changed +7
-0
lines changed
4 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2161,6 +2161,7 @@ name = "rustc_errors"
2161
2161
version = " 0.0.0"
2162
2162
dependencies = [
2163
2163
" atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" ,
2164
+ " log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" ,
2164
2165
" rustc_cratesio_shim 0.0.0" ,
2165
2166
" rustc_data_structures 0.0.0" ,
2166
2167
" 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 @@ -98,6 +98,9 @@ impl<'a> DiagnosticBuilder<'a> {
98
98
diagnostic = :: std:: ptr:: read ( & self . diagnostic ) ;
99
99
:: std:: mem:: forget ( self ) ;
100
100
} ;
101
+ // Logging here is useful to help track down where in logs an error was
102
+ // actually emitted.
103
+ debug ! ( "buffer: diagnostic={:?}" , diagnostic) ;
101
104
buffered_diagnostics. push ( diagnostic) ;
102
105
}
103
106
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ extern crate atty;
24
24
extern crate termcolor;
25
25
#[ cfg( unix) ]
26
26
extern crate libc;
27
+ #[ macro_use]
28
+ extern crate log;
27
29
extern crate rustc_data_structures;
28
30
extern crate serialize as rustc_serialize;
29
31
extern crate syntax_pos;
You can’t perform that action at this time.
0 commit comments