Process CometBFT stdout stream
(stream: tokio::process::ChildStdout)
| 105 | |
| 106 | /// Process CometBFT stdout stream |
| 107 | async fn process_stdout_stream(stream: tokio::process::ChildStdout) { |
| 108 | use tokio::io::{AsyncBufReadExt, BufReader}; |
| 109 | |
| 110 | let reader = BufReader::new(stream); |
| 111 | let mut lines = reader.lines(); |
| 112 | |
| 113 | while let Ok(Some(line)) = lines.next_line().await { |
| 114 | if !line.trim().is_empty() { |
| 115 | tracing::event!( |
| 116 | target: CONSENSUS_TARGET, |
| 117 | tracing::Level::INFO, |
| 118 | "CometBFT: {}", |
| 119 | line |
| 120 | ); |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /// Process CometBFT stderr stream |
| 126 | async fn process_stderr_stream(stream: tokio::process::ChildStderr) { |
no test coverage detected