1. 程式人生 > >tomcat訪問記錄日誌

tomcat訪問記錄日誌

每一次請求(包括靜態檔案請求)都會在列印到日誌檔案中去

<Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    <Alias>www.douliu.com</Alias>
    <!--<Alias>www2.shenbianapp.com</Alias>-->
    <Alias>douliu.com</Alias>
    <Alias>shenbianapp.com</Alias>
    <Alias>picture.shenbianapp.com</Alias>
  <Context path="" docBase="/home/Data/www/dreamrunnerOfficial" reloadable="true" crossContext="true" />
  <Context path="/douliu" docBase="/home/Data/www/douliu" reloadable="false" crossContext="true" allowLinking="true" />
  <Context path="/dreamrunner" docBase="/home/Data/www/dreamrunner" reloadable="false" crossContext="true" allowLinking="true" />
  <Context path="/download" docBase="/home/Storage/douliuicons/douliuicons/download/" reloadable="true" crossContext="true" />

  <Valve className="org.apache.catalina.valves.AccessLogValve" directory="/home/Data/log/tomcat/logs/"
	 prefix="access." suffix=".log"
	 pattern="%a %{X-Forwarded-For}i %l %u %t "%r" %S %{zsbv}i %{userId}s  %s %b %D" />
</Host>