-
Notifications
You must be signed in to change notification settings - Fork 0
/
uwsgi.ini
35 lines (30 loc) · 1.57 KB
/
uwsgi.ini
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
[uwsgi]
module = wsgi
callable = app
processes = 2
buffer-size = 16384
; Configure JSON output for app logs
logger = app stdio
log-route = app ^\{
log-encoder = format:app ${msg}
log-encoder = nl:app
; Configure JSON output for uWSGI general logs
logger = uwsgi stdio
log-route = uwsgi ^[^\{]
log-encoder = json:uwsgi {"name": "uWSGI", "timestamp": "${strftime:%%Y-%%m-%%dT%%T%%z}", "message": "${msg}"}
log-encoder = nl:uwsgi
log-master-bufsize = 65535
; Configure JSON output for uWSGI request logs
; WARNING: If any field values in log-format contain a double-quote,
; it will not be escaped, and invalid JSON will be produced.
; For this reason, User-Agent has been omitted for now.
; NOTE: Disabled request logging to increase load capability
disable-logging = True
req-logger = stdio
log-format = "uri": "%(uri)", "method": "%(method)", "remote_user": "%(user)", "remote_addr": "%(addr)", "http_host": "%(host)", "proto": "%(proto)", "referer": "%(referer)", "status": %(status), "response_time": %(micros), "time": "%(time)", "ltime": "%(ltime)", "res_header_size": %(hsize), "res_body_size": %(rsize), "pid": %(pid), "worker_id": %(wid), "async_switches": %(switches), "vsz": %(vsz), "rss": %(rss), "req_packet_size": %(pktsize), "read_errors": %(rerr), "write_errors": %(werr), "tmicros": %(tmicros), "req_size": %(cl)
log-req-encoder = format {"name": "uWSGI-request", "timestamp": "${strftime:%%Y-%%m-%%dT%%T%%z}", ${msg}}
log-req-encoder = nl
need-app = True
; ddtrace requires this
; https://github.com/DataDog/dd-trace-py/blob/master/docs/advanced_usage.rst#uwsgi
enable-threads = True