feat: more flexible config values (#299)

This commit is contained in:
sigoden
2023-11-27 04:24:25 +08:00
committed by GitHub
parent 7584fe3d08
commit 6ff8b29b69
6 changed files with 226 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ use crate::{auth::get_auth_user, server::Request};
pub const DEFAULT_LOG_FORMAT: &str = r#"$remote_addr "$request" $status"#;
#[derive(Debug)]
#[derive(Debug, Clone, PartialEq)]
pub struct HttpLogger {
elements: Vec<LogElement>,
}
@@ -15,7 +15,7 @@ impl Default for HttpLogger {
}
}
#[derive(Debug)]
#[derive(Debug, Clone, PartialEq)]
enum LogElement {
Variable(String),
Header(String),