[Fix] Stability

This commit is contained in:
Alex 2026-07-27 20:37:33 +02:00
commit 14df716cf1
Signed by: alex
SSH key fingerprint: SHA256:D1+Ub8o0v4K5y1JNivW8IxEOelqLSvPmUzBbDIoZkRQ
19 changed files with 483 additions and 405 deletions

View file

@ -98,19 +98,19 @@ pub fn startup_with_log_dir(log_dir: Option<std::path::PathBuf>) {
format!("{} ", msg.prefix)
};
let line1 = format!(
"{} {}{}",
let line = format!(
"{} {} {}{}",
fixed_box(&msg.timestamp_ms.to_string(), 13),
timestamp,
prefix,
resolved_message
);
let line2 = format!(" {}", timestamp);
if let Some(file) = file.as_mut() {
let _ = writeln!(file, "{}\n{}", line1, line2);
let _ = writeln!(file, "{}", line);
}
let _ = writeln!(std::io::stderr(), "{}\n{}", line1, line2);
let _ = writeln!(std::io::stderr(), "{}", line);
let entry = UiLogEntry {
timestamp_ms: msg.timestamp_ms,
@ -329,8 +329,11 @@ pub fn format_cv(cv: &CommunicationValue) -> String {
parts.push(format!("> {}", receiver));
}
let comm_type = cv.get_type().to_string();
parts.push(format!("{}", comm_type));
let comm_type = cv
.get_comm_type_enum()
.map(|kind| kind.to_string())
.unwrap_or_else(|| cv.get_type().to_string());
parts.push(format!("{} (id={})", comm_type, cv.get_id()));
let data = cv.data();