diff --git a/Cargo.lock b/Cargo.lock index 6cc4276..de22180 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1161,6 +1161,7 @@ dependencies = [ "arc-swap", "chrono", "derivative", + "flate2", "fnv", "humantime", "libc", diff --git a/Cargo.toml b/Cargo.toml index f4ba7d9..789b15f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ itertools = "0.10" json = "0.12" lazy_static = "1.4" log = "*" -log4rs = "1" +log4rs = { version = "1", features = ["gzip"] } markup5ever_rcdom = "0.3" md5 = "0.7" modular-bitfield = "0.11" diff --git a/log-cfg.yml b/log-cfg.yml index d2a2bde..6462b7d 100644 --- a/log-cfg.yml +++ b/log-cfg.yml @@ -7,7 +7,7 @@ appenders: kind: rolling_file path: "log/requests.log" encoder: - pattern: "{d} - {m}{n}" + pattern: "{d(%Y-%m-%d %H:%M:%S)} - {m}{n}" policy: kind: compound trigger: @@ -17,7 +17,7 @@ appenders: kind: fixed_window base: 1 count: 5 - pattern: "logs/requests.{}.log" + pattern: "log/requests.{}.log.gz" root: level: info appenders: