Nginx:$ request_time没有被logging

这是我在nginx中的 log_format

log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"' ' $request_time'; 

这里是访问日志的输出

 xx155.x - - [31/Oct/2011:03:54:18 +0000] "POST /xx/ HTTP/1.1" 200 127 "http://xx/ab.cc" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1" 

不知何故请求时间没有被logging 。 有人可以帮助解决这个问题吗?

我怀疑你没有指定为access_log格式的main

 access_log /var/log/nginx/localhost.access_log main; 

所以使用combined格式。