diff --git a/.gitignore b/.gitignore index 5c83fd5..f0f9c70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *~ target/ rel.drawio.png +src/config/build_cfg.rs diff --git a/build/config.toml b/build/config.toml index 4be8ca8..1072f1d 100644 --- a/build/config.toml +++ b/build/config.toml @@ -5,4 +5,4 @@ timeout = 5 # Logging options [log] -default_time_local = false \ No newline at end of file +default_time_local = false diff --git a/src/config/build_cfg.rs b/src/config/build_cfg.rs deleted file mode 100644 index a442de7..0000000 --- a/src/config/build_cfg.rs +++ /dev/null @@ -1,34 +0,0 @@ -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(dead_code)] - -use std::borrow::Cow; - -#[derive(Debug, Clone)] -#[allow(non_camel_case_types)] -pub struct Config { - pub hot: _Config__hot, - pub log: _Config__log, -} - -#[derive(Debug, Clone)] -#[allow(non_camel_case_types)] -pub struct _Config__hot { - pub backlog: i64, - pub timeout: i64, -} - -#[derive(Debug, Clone)] -#[allow(non_camel_case_types)] -pub struct _Config__log { - pub default_time_local: bool, -} - -pub const CONFIG: Config = Config { - hot: _Config__hot { - backlog: 100, - timeout: 5, - }, - log: _Config__log { - default_time_local: false, - }, -}; diff --git a/src/log.rs b/src/log.rs index ea77d65..47fd997 100644 --- a/src/log.rs +++ b/src/log.rs @@ -257,8 +257,8 @@ impl Logger fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - Self::Local(l) => write!(f, "{}", l), - Self::Utc(l) => write!(f, "{}", l), + Self::Local(l) => write!(f, "{}", l.format("%Y-%m-%d %H:%M:%S %Z")), + Self::Utc(l) => write!(f, "{}", l.format("%Y-%m-%d %H:%M:%S %Z")), } } }