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 {
48
48
return ;
49
49
}
50
50
51
- let should_flush = match & self . file {
51
+ match & self . file {
52
52
Some ( w) => {
53
53
let _ = writeln ! (
54
54
w. lock( ) ,
@@ -57,22 +57,21 @@ impl Log for Logger {
57
57
record. module_path( ) . unwrap_or_default( ) ,
58
58
record. args( ) ,
59
59
) ;
60
- self . no_buffering
60
+
61
+ if self . no_buffering {
62
+ self . flush ( ) ;
63
+ }
61
64
}
62
65
None => {
63
- eprintln ! (
64
- "[{} {}] {}" ,
66
+ let message = format ! (
67
+ "[{} {}] {}\n " ,
65
68
record. level( ) ,
66
69
record. module_path( ) . unwrap_or_default( ) ,
67
70
record. args( ) ,
68
71
) ;
69
- true // flush stderr unconditionally
72
+ eprint ! ( "{}" , message ) ;
70
73
}
71
74
} ;
72
-
73
- if should_flush {
74
- self . flush ( ) ;
75
- }
76
75
}
77
76
78
77
fn flush ( & self ) {
You can’t perform that action at this time.
0 commit comments