配置在stream段:
- log_format proxy '$remote_addr [$time_local]'
- '$protocol $status $bytes_sent $bytes_received'
- '$session_time "$upstream_addr" '
- '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
- access_log /var/log/nginx/tcp-access.log proxy ;
- error_log /var/log/nginx/tcp-error.log warn ;
转载于:https://blog.51cto.com/liuzhengwei521/2135449
标签:log,四层,time,bytes,tcp,nginx,upstream,日志 From: https://www.cnblogs.com/cheyunhua/p/17451625.html