We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8aadbfb + ad971f0 commit cfa7d91Copy full SHA for cfa7d91
src/rust/lib_ccxr/src/util/log.rs
@@ -281,8 +281,16 @@ impl<'a> CCExtractorLogger {
281
282
fn print(&self, args: &Arguments<'a>) {
283
match &self.target {
284
- OutputTarget::Stdout => print!("{args}"),
285
- OutputTarget::Stderr => eprint!("{args}"),
+ OutputTarget::Stdout => {
+ print!("{args}");
286
+ // Flush stdout to ensure output appears immediately, especially when
287
+ // mixing with C code that also writes to stdout
288
+ let _ = std::io::Write::flush(&mut std::io::stdout());
289
+ }
290
+ OutputTarget::Stderr => {
291
+ eprint!("{args}");
292
+ let _ = std::io::Write::flush(&mut std::io::stderr());
293
294
OutputTarget::Quiet => {}
295
}
296
0 commit comments