better inputs, log config

This commit is contained in:
2019-07-27 16:47:08 +02:00
parent 39b136d799
commit ee01892a22
7 changed files with 289458 additions and 53 deletions

14
src/config.rs Normal file
View File

@@ -0,0 +1,14 @@
use serde_derive::{Serialize, Deserialize};
use toml;
use std::fs;
#[derive(Debug, Serialize, Deserialize)]
pub struct LogConfig {
pub input: bool
}
impl LogConfig {
pub fn from_file(path: &str) -> Self {
toml::from_slice(&fs::read(path).expect("Failed to read log config!")).expect("Failed to parse log config!")
}
}