Add optional file logging and fix board offsets

Introduce --log CLI flag to enable logging to
war_in_tunnels.log via simplelog.
This commit is contained in:
GarandPLG committed 2026-03-27 18:28:16 +01:00
1 parent b71130d3d6
commit a0186ea0cb
8 files changed
+74 -2

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
use simplelog::{Config, LevelFilter, WriteLogger};
use std::fs::File;
pub fn init_logger() {
WriteLogger::init(
LevelFilter::Info,
Config::default(),
File::create("war_in_tunnels.log").expect("Failed to create log file"),
)
.expect("Failed to initialize logger");
}