当前位置:首页 > 开发 > 研发管理 > 正文

resin的访问日志配置

发表于: 2013-12-11   作者:css_gongxifacai   来源:转载   浏览:
摘要: 此文转载。 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 reque
此文转载。
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"/>

resin的访问日志配置

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号