File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
crates/rust-analyzer/src/bin Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ impl Log for Logger {
4848 return ;
4949 }
5050
51- let should_flush = match & self . file {
51+ match & self . file {
5252 Some ( w) => {
5353 let _ = writeln ! (
5454 w. lock( ) ,
@@ -57,22 +57,21 @@ impl Log for Logger {
5757 record. module_path( ) . unwrap_or_default( ) ,
5858 record. args( ) ,
5959 ) ;
60- self . no_buffering
60+
61+ if self . no_buffering {
62+ self . flush ( ) ;
63+ }
6164 }
6265 None => {
63- eprintln ! (
64- "[{} {}] {}" ,
66+ let message = format ! (
67+ "[{} {}] {}\n " ,
6568 record. level( ) ,
6669 record. module_path( ) . unwrap_or_default( ) ,
6770 record. args( ) ,
6871 ) ;
69- true // flush stderr unconditionally
72+ eprint ! ( "{}" , message ) ;
7073 }
7174 } ;
72-
73- if should_flush {
74- self . flush ( ) ;
75- }
7675 }
7776
7877 fn flush ( & self ) {
You can’t perform that action at this time.
0 commit comments