-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlog4rs_sample.yml
57 lines (54 loc) · 1.24 KB
/
log4rs_sample.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# A sample log configuration file for running in release mode. By default, this configuration splits up log messages to
# See https://docs.rs/log4rs/0.8.3/log4rs/encode/pattern/index.html for deciphering the log pattern. The log format
# used in this sample configuration prints messages as:
# timestamp [target] LEVEL message
refresh_rate: 30 seconds
appenders:
# An appender named "stdout" that writes to file.
stdout:
kind: console
encoder:
pattern: "{d(%H:%M)} {h({l}):5} {m}{n}"
filters:
- kind: threshold
level: info
clythor:
kind: rolling_file
path: "{{log_dir}}/clythor.log"
policy:
kind: compound
trigger:
kind: size
limit: 200mb
roller:
kind: fixed_window
base: 1
count: 50
pattern: "{{log_dir}}/clythor.{}.log"
encoder:
pattern: "{d(%Y-%m-%d %H:%M:%S.%f)} [{t}] {l:5} {m}{n}"
# root
root:
level: debug
appenders:
- stdout
- clythor
loggers:
h2:
level: info
appenders:
- stdout
- clythor
additive: false
hyper:
level: info
appenders:
- stdout
- clythor
additive: false
selectors:
level: error
appenders:
- stdout
- clythor
additive: false