generated from GarandPLG/rust-flake-template
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:
1 parent
b71130d3d6
commit
a0186ea0cb
8 files changed
+74
-2
No files matched your search
+11
@@ -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");
|
||||
}
|
||||
Reference in new issue
Block a user