debug is now running properly in the background without any issues
This commit is contained in:
@@ -33,8 +33,18 @@ impl io::Write for UiDebugWriter {
|
||||
let message = String::from_utf8_lossy(buf).trim().to_string();
|
||||
let is_error = message.starts_with("ERROR");
|
||||
|
||||
// Always keep in memory
|
||||
buffer.push_back((message, is_error));
|
||||
// Keep in memory for UI
|
||||
buffer.push_back((message.clone(), is_error));
|
||||
|
||||
// ALSO log directly to file (non-blocking best effort)
|
||||
if let Ok(mut file) = OpenOptions::new()
|
||||
.create(true)
|
||||
.append(true)
|
||||
.open("ui_debug.log")
|
||||
{
|
||||
let _ = writeln!(file, "{message}");
|
||||
}
|
||||
|
||||
Ok(buf.len())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user