tomcat常见设置

1、请求日志

 

 

 

tomcat 统一访问日志记录,添加请求响应时间

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b &quot;%D ms&quot;" />

      </Host>

 

posted @ 2018-04-28 15:23  练好本领,报国杀敌  阅读(195)  评论(0编辑  收藏  举报