Base working commit with a UI thread (Tokio), Network thread (Tokio), and an input events thread (std).

This commit is contained in:
2023-08-08 10:50:03 -06:00
parent f436a66069
commit 0d4e283c21
15 changed files with 532 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
use log4rs::append::file::FileAppender;
use log4rs::config::{Appender, Root};
use log4rs::encode::pattern::PatternEncoder;
use log::LevelFilter;
pub fn init_logging_config() -> log4rs::Config {
let file_path = "/tmp/devtools.log";
let logfile = FileAppender::builder()
.encoder(Box::new(PatternEncoder::new("{l} - {m}\n")))
.build(file_path)
.unwrap();
log4rs::Config::builder()
.appender(Appender::builder().build("logfile", Box::new(logfile)))
.build(Root::builder()
.appender("logfile")
.build(LevelFilter::Debug))
.unwrap()
}