Lighttpd日志打印格式

检查lighttpd打印的日志时,有些字段意义模糊,就找了个对照说明,备份一下

原文地址:http://redmine.lighttpd.net/projects/1/wiki/Docs_ModAccesslog 

Option Description
%% a percent sign
%h name or address of remote-host
%l ident name (not supported)
%u authenticated user
%t timestamp of the end-time of the request
%r request-line
%s status code
%b bytes sent for the body
%i HTTP-header field
%a remote address
%A local address
%B same as %b
%C cookie field (not supported)
%D time used in ms (not supported)
%e environment
%f physical filename
%H request protocol (HTTP/1.0, ...)
%m request method (GET, POST, ...)
%n (not supported)
%o `response header`_
%p server port
%P (not supported)
%q query string
%T time used in seconds
%U request URL
%v server-name
%V HTTP request host name
%X connection status
%I bytes incomming
%O bytes outgoing

 文中的一些注意

If %s is written %>s or %<s the < and the > are ignored. They are supported for compatibility with apache.

%h will always return the IP address of the host, never the name. This makes it equivalent to %a, which is not implemented.

%a, %A, %{name}C, %D are all unimplemented as of 1.4.26 and 1.5.0-r2700

%i and %o expect the name of the field which should be written in curly brackets.

%q is not prepended with '?', unlike Apache

%{StrFTime format string}t is supported since 1.4.24.

%t does not work the same way it works in Apache (where the start of the request is recorded). Instead it shows the time the request actually got delivered. This is done due to performance reasons. For most users this does not matter as usually requests don't take long to get processed. In case you want to find out the time the request was started add the %T option to your log-string and subtract it's value from the time shown by %t.

 

原文地址:https://www.cnblogs.com/zhaobolu/p/4283879.html