Show More
@@ -237,6 +237,10 b' class = StreamHandler' | |||||
237 | args = (sys.stderr, ) |
|
237 | args = (sys.stderr, ) | |
238 | level = DEBUG |
|
238 | level = DEBUG | |
239 | formatter = generic |
|
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 | ; FORMATTERS |
|
246 | ; FORMATTERS | |
@@ -245,3 +249,8 b' formatter = generic' | |||||
245 | [formatter_generic] |
|
249 | [formatter_generic] | |
246 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
250 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
247 | datefmt = %Y-%m-%d %H:%M:%S |
|
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 | access_log_format = ( |
|
33 | access_log_format = ( | |
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"') |
|
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 | # self adjust workers based on CPU count |
|
40 | # self adjust workers based on CPU count | |
37 | # workers = get_workers() |
|
41 | # workers = get_workers() | |
38 |
|
42 |
@@ -200,6 +200,10 b' class = StreamHandler' | |||||
200 | args = (sys.stderr, ) |
|
200 | args = (sys.stderr, ) | |
201 | level = INFO |
|
201 | level = INFO | |
202 | formatter = generic |
|
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 | ; FORMATTERS |
|
209 | ; FORMATTERS | |
@@ -208,3 +212,8 b' formatter = generic' | |||||
208 | [formatter_generic] |
|
212 | [formatter_generic] | |
209 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s |
|
213 | format = %(asctime)s.%(msecs)03d [%(process)d] %(levelname)-5.5s [%(name)s] %(message)s | |
210 | datefmt = %Y-%m-%d %H:%M:%S |
|
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