有时我们需要监听或者查看服务器(uWSGI)是否接到请求,所以我们要查看uWSGI的请求日志信息
uwsgi:
http: 0.0.0.0:80
chdir: /export/servers/app/mm
module: mm.web.wsgi
processes: 6
listen : 120
daemonize: /tmp/uwsgi.log
pidfile: /tmp/uwsgi.pid
master: true
disable-logging : true
disable-logging 的含义是停止输出request log
当是true 时:表示关闭所有请求日志,就不会打印请求日志信息了
当是false时:表示开启所有请求日志,日志会存到daemonize指定的文件中
daemonize: /tmp/uwsgi.log 这个设置会记录uwsgi的进程信息和请求日志信息,格式如下:
[pid: 19300|app: 0|req: 8/12] 10.13.15.113 () {40 vars in 760 bytes} [Thu Apr 11 09:46:39 2019] GET /resource/instance_event/ => generated 2 bytes in 6 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19305|app: 0|req: 3/13] 10.13.15.113 () {40 vars in 771 bytes} [Thu Apr 11 09:46:39 2019] GET /data/instance_hotmap/?args=top => generated 2 bytes in 8 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19304|app: 0|req: 2/14] 10.13.15.113 () {40 vars in 765 bytes} [Thu Apr 11 09:46:42 2019] GET /data/meta-data/?key=ip_list => generated 507 bytes in 8 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19300|app: 0|req: 9/15] 10.13.15.113 () {40 vars in 775 bytes} [Thu Apr 11 09:46:42 2019] GET /data/resource/?key=get_dept_list => generated 324 bytes in 9 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19303|app: 0|req: 2/16] 10.13.15.113 () {40 vars in 777 bytes} [Thu Apr 11 09:46:42 2019] GET /data/resource/?key=get_plant_list => generated 263 bytes in 8 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19301|app: 0|req: 1/17] 10.13.15.113 () {40 vars in 799 bytes} [Thu Apr 11 09:46:42 2019] GET /data/resource/?key=get_instance_package_list => generated 2 bytes in 48 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19305|app: 0|req: 4/18] 10.13.15.113 () {40 vars in 750 bytes} [Thu Apr 11 09:46:42 2019] GET /api/console/deploy/ => generated 588 bytes in 61 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19300|app: 0|req: 10/19] 10.13.15.113 () {40 vars in 752 bytes} [Thu Apr 11 09:46:43 2019] GET /data/deploy/history/ => generated 7485 bytes in 21 msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
[pid: 19302|app: 0|req: 1/20] 10.13.15.113 () {40 vars in 829 bytes} [Thu Apr 11 09:46:39 2019] GET /slowlog/stats_info_by_time/?type=hour&time=2019-04-11+09:46 => generated 27 bytes in 6158 msecs (HTTP/1.1 500) 2 headers in 77 bytes (1 switches on core 0)