Skip to content

Commit 7e2d188

Browse files
fix: wrap python basic logs in debug assertion in launcher (#2539)
* fix: wrap python basic logs in debug assertion in launcher * use level filters instead
1 parent f478aa7 commit 7e2d188

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

launcher/src/main.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,11 +1038,13 @@ fn log_lines<R: Sized + Read>(mut bufread: BufReader<R>) {
10381038
Ok(log) => log.trace(),
10391039
// For interactive debugging ?
10401040
Err(_) => {
1041-
stdout.write_all(line).unwrap();
1042-
if lines.peek().is_some() {
1043-
stdout.write_all(b"\n").unwrap();
1041+
if LevelFilter::current() >= tracing::Level::DEBUG {
1042+
stdout.write_all(line).unwrap();
1043+
if lines.peek().is_some() {
1044+
stdout.write_all(b"\n").unwrap();
1045+
}
1046+
stdout.flush().unwrap();
10441047
}
1045-
stdout.flush().unwrap();
10461048
}
10471049
}
10481050
}

0 commit comments

Comments
 (0)