##// END OF EJS Templates
configs: added changed require to track logging with loki or logstash
super-admin -
r1019:345b06ac default
parent child Browse files
Show More
@@ -237,6 +237,10 b' class = StreamHandler'
237 237 args = (sys.stderr, )
238 238 level = DEBUG
239 239 formatter = generic
240 ; To enable JSON formatted logs replace generic with json
241 ; This allows sending properly formatted logs to grafana loki or elasticsearch
242 #formatter = json
243
240 244
241 245 ; ##########
242 246 ; FORMATTERS
@@ -245,3 +249,8 b' formatter = generic'
245 249 [formatter_generic]
246 250 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
247 251 datefmt = %Y-%m-%d %H:%M:%S
252
253 [formatter_json]
254 format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s
255 class = vcsserver.lib._vendor.jsonlogger.JsonFormatter
256
@@ -33,6 +33,10 b' tmp_upload_dir = None'
33 33 access_log_format = (
34 34 '%(t)s %(p)s INFO [GNCRN] %(h)-15s rqt:%(L)s %(s)s %(b)-6s "%(m)s:%(U)s %(q)s" usr:%(u)s "%(f)s" "%(a)s"')
35 35
36 # loki format for easier parsing in grafana
37 #access_log_format = (
38 # 'time="%(t)s" pid=%(p)s level="INFO" type="[GNCRN]" ip="%(h)-15s" rqt="%(L)s" response_code="%(s)s" response_bytes="%(b)-6s" uri="%(m)s:%(U)s %(q)s" user=":%(u)s" user_agent="%(a)s"')
39
36 40 # self adjust workers based on CPU count
37 41 # workers = get_workers()
38 42
@@ -200,6 +200,10 b' class = StreamHandler'
200 200 args = (sys.stderr, )
201 201 level = INFO
202 202 formatter = generic
203 ; To enable JSON formatted logs replace generic with json
204 ; This allows sending properly formatted logs to grafana loki or elasticsearch
205 #formatter = json
206
203 207
204 208 ; ##########
205 209 ; FORMATTERS
@@ -208,3 +212,8 b' formatter = generic'
208 212 [formatter_generic]
209 213 format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s
210 214 datefmt = %Y-%m-%d %H:%M:%S
215
216 [formatter_json]
217 format = %(timestamp)s %(levelname)s %(name)s %(message)s %(req_id)s
218 class = vcsserver.lib._vendor.jsonlogger.JsonFormatter
219
General Comments 0
You need to be logged in to leave comments. Login now