tengine log格式修改
某厂面试归来,发现自己落伍了!>>> ####tengine的log_format log_format myaccess 'RequestFrom:$remote_addr AccessTime:[$time_local] RequestURI:"$request" ' 'ResponseHttpCode:$status ResponseBodySize:$body_bytes_sent ' 'Upstream:$upstream_addr UpstreamStatus:$upstream_status ' 'ProcessTime:$request_time ResponseContentLength:$sent_http_Content_Length ' 'RequestBody:$request_body '; server { listen 80; ...... access_log /tmp/localhost_access.txt myaccess; ....... ####reload后查看日志 # tail -f /tmp/localhost_access.txt RequestFrom:127.0.0.1 AccessTime:[17/Jun/2016:16:29:29 +0800] RequestURI:"POST /123 HTTP/1.1"