enable gzip support for log4rs

This commit is contained in:
2024-09-21 05:15:16 +00:00
committed by GitHub
parent 1cc8e67fb1
commit 684ef9fc34
3 changed files with 4 additions and 3 deletions

1
Cargo.lock generated
View File

@@ -1161,6 +1161,7 @@ dependencies = [
"arc-swap",
"chrono",
"derivative",
"flate2",
"fnv",
"humantime",
"libc",

View File

@@ -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"

View File

@@ -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: