Skip to content

Commit

Permalink
fix: wrap python basic logs in debug assertion in launcher (#2539)
Browse files Browse the repository at this point in the history
* fix: wrap python basic logs in debug assertion in launcher

* use level filters instead
  • Loading branch information
OlivierDehaene authored Sep 20, 2024
1 parent f478aa7 commit 7e2d188
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions launcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,11 +1038,13 @@ fn log_lines<R: Sized + Read>(mut bufread: BufReader<R>) {
Ok(log) => log.trace(),
// For interactive debugging ?
Err(_) => {
stdout.write_all(line).unwrap();
if lines.peek().is_some() {
stdout.write_all(b"\n").unwrap();
if LevelFilter::current() >= tracing::Level::DEBUG {
stdout.write_all(line).unwrap();
if lines.peek().is_some() {
stdout.write_all(b"\n").unwrap();
}
stdout.flush().unwrap();
}
stdout.flush().unwrap();
}
}
}
Expand Down

0 comments on commit 7e2d188

Please sign in to comment.