Files
plan2code/plan2code-app/src-tauri/src/log.rs
T

11 lines
424 B
Rust

//! Lines for the app's log, its stderr, on the paths a quit takes. `eprintln!` panics when the
//! write fails, as it does once the terminal the app was started from has closed: the quit's
//! cleanup would end at its first line, with the app still open.
use std::io::Write;
/// Writes one line, or nothing when the log cannot be written to.
pub fn line(text: &str) {
let _ = writeln!(std::io::stderr(), "{text}");
}