computer: store part 3

This commit is contained in:
nym21
2025-06-29 17:39:31 +02:00
parent 663092b501
commit 6e996797b8
25 changed files with 605 additions and 225 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ pub fn init(path: Option<&Path>) {
.strftime("%Y-%m-%d %H:%M:%S")
.to_string();
let level = record.level().as_str().to_lowercase();
let level = format!("{:5}", level);
let level = format!("{level:5}");
let target = record.target();
let dash = "-";
let args = record.args();
@@ -81,7 +81,7 @@ fn write(
dash: impl Display,
args: impl Display,
) -> Result<(), std::io::Error> {
writeln!(buf, "{} {} {} {}", date_time, dash, level, args)
writeln!(buf, "{date_time} {dash} {level} {args}")
// Don't remove, used to know the target of unwanted logs
// writeln!(
// buf,