普通日志格式 common log format,CLF common大多数日志分析软件都支持这种格式
参考日志格式 referer log format referer记录客户访问站点的用户身份
代理日志格式 agent log format agent记录请求的用户代理
综合日志格式 combined log format combined结合以上三种日志信息
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent
Format String | Description |
---|---|
%% |
The percent sign |
%a |
Remote IP-address |
%A |
Local IP-address |
%B |
Size of response in bytes, excluding HTTP headers. |
%b |
Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '- ' rather than a 0 when no bytes are sent. |
%{
Foobar}C |
The contents of cookie Foobar in the request sent to the server. Only version 0 cookies are fully supported. |
%D |
The time taken to serve the request, in microseconds. |
%{
FOOBAR}e |
The contents of the environment variable FOOBAR |
%f |
Filename |