generated from aetheric-oss/svc-template-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4rs.yaml
174 lines (171 loc) · 3.36 KB
/
log4rs.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
## DO NOT EDIT!
# This file was provisioned by OpenTofu
# File origin: https://github.com/aetheric-oss/tofu-github/tree/main/src/modules/vars/templates/rust/svc/log4rs.yaml
---
refresh_rate: 30 seconds
appenders:
stdout:
kind: console
encoder:
# https://medium.com/nikmas-group-rust/advanced-logging-in-rust-with-log4rs-2d712bb322de
pattern: "{d(%Y-%m-%d %H:%M:%S)} | {I} | {h({l}):5.5} | {f}:{L} | {m}{n}"
filters:
- kind: threshold
level: info
client_requests:
kind: rolling_file
path: "logs/client_requests.log"
policy:
trigger:
kind: size
limit: 20mb
roller:
kind: fixed_window
pattern: logs/client_requests_{}.gz
count: 5
base: 1
encoder:
kind: json
filters:
- kind: threshold
level: info
grpc_requests:
kind: rolling_file
path: "logs/grpc_requests.log"
policy:
trigger:
kind: size
limit: 20mb
roller:
kind: fixed_window
pattern: logs/grpc_requests_{}.gz
count: 5
base: 1
encoder:
kind: json
filters:
- kind: threshold
level: info
rest_requests:
kind: rolling_file
path: "logs/rest_requests.log"
policy:
trigger:
kind: size
limit: 20mb
roller:
kind: fixed_window
pattern: logs/rest_requests_{}.gz
count: 5
base: 1
encoder:
kind: json
filters:
- kind: threshold
level: info
psql:
kind: rolling_file
path: "logs/psql.log"
policy:
trigger:
kind: size
limit: 20mb
roller:
kind: fixed_window
pattern: logs/psql{}.gz
count: 5
base: 1
encoder:
kind: json
filters:
- kind: threshold
level: info
postgis:
kind: rolling_file
path: "logs/postgis.log"
policy:
trigger:
kind: size
limit: 20mb
roller:
kind: fixed_window
pattern: logs/postgis_{}.gz
count: 5
base: 1
encoder:
kind: json
filters:
- kind: threshold
level: info
tests:
kind: rolling_file
path: "logs/tests.log"
policy:
trigger:
kind: size
limit: 20mb
roller:
kind: fixed_window
pattern: logs/tests_{}.gz
count: 5
base: 1
encoder:
kind: json
filters:
- kind: threshold
level: info
debug_file:
kind: rolling_file
path: "logs/debug.log"
policy:
trigger:
kind: size
limit: 20mb
roller:
kind: fixed_window
pattern: logs/debug_{}.gz
count: 5
base: 1
encoder:
kind: json
filters:
- kind: threshold
level: debug
root:
level: debug
appenders:
- debug_file
- stdout
loggers:
backend::psql:
level: debug
appenders:
- psql
backend::postgis:
level: debug
appenders:
- postgis
app::rest:
level: debug
appenders:
- rest_requests
app::grpc:
level: debug
appenders:
- grpc_requests
app::grpc::clients::grpc:
level: debug
appenders:
- client_requests
app::client::storage::grpc:
level: debug
appenders:
- client_requests
test::ut:
level: debug
appenders:
- tests
test::it:
level: debug
appenders:
- tests