resin access.log format配置详解

The access log formatting variables follow the Apache variables:

 

   
%b result content length
%D time taken to complete the request in microseconds (since 3.0.16)
%h remote IP addr
%{xxx}i request header xxx
%{xxx}o response header xxx
%{xxx}c cookie value xxx
%n request attribute
%r request URL
%s status code
%{xxx}t request date with optional time format string.
%T time taken to complete the request in seconds
%u remote user
%U request URI
%v name of the virtual host serving the request

 

The default format is:

default access log format
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""

 

Timestamp format string

The timestamp for log tags is a format string which can contain percent codes which are substituted with time and date values.

 

   
%a day of week (short)
%A day of week (verbose)
%b day of month (short)
%B day of month (verbose)
%c Java locale date
%d day of month (two-digit)
%H 24-hour (two-digit)
%I 12-hour (two-digit)
%j day of year (three-digit)
%m month (two-digit)
%M minutes
%p am/pm
%S seconds
%s milliseconds
%W week in year (three-digit)
%w day of week (one-digit)
%y year (two-digit)
%Y year (four-digit)
%Z time zone (name)
%z time zone (+/-0800)

 

Example: typical timestamp for the log tag
<resin xmlns="http://caucho.com/ns/resin">
<log-handler name=‘‘ path=‘stderr:‘ timestamp="[%H:%M:%S.%s]"/>
...
</resin>

resin access.log format配置详解,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。