resin的访问日志配置

此文转载。
http://wuyilun2.blog.163.com/blog/static/9853110201111910553408/

The access log formatting variables follow the Apache variables:

%bresult content length%Dtime taken to complete the request in microseconds (since 3.0.16)%hremote IP addr%{xxx}irequest header xxx%{xxx}oresponse header xxx%{xxx}ccookie value xxx%nrequest attribute%rrequest URL%sstatus code%{xxx}trequest date with optional time format string.%Ttime taken to complete the request in seconds%uremote user%Urequest URI%vname 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.

%aday of week (short)%Aday of week (verbose)%bday of month (short)%Bday of month (verbose)%cJava locale date%dday of month (two-digit)%H24-hour (two-digit)%I12-hour (two-digit)%jday of year (three-digit)%mmonth (two-digit)%Mminutes%pam/pm%Sseconds%smilliseconds%Wweek in year (three-digit)%wday of week (one-digit)%yyear (two-digit)%Yyear (four-digit)%Ztime zone (name)%ztime 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]"/>
...



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






</resin> 线上配置  -->
      <access-log path="logs/access.log"
            format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
            rollover-size="500mb"/>

猜你喜欢

转载自css-gongxifacai.iteye.com/blog/1988058