<?xml version='1.0' encoding='utf-8'?>
<!--
  Cloud Foundry Java Buildpack
  Copyright (c) 2013 the original author or authors.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<Server port='-1'>

    <Listener className='org.apache.catalina.core.JasperListener'/>

    <Service name='Catalina'>
        <Connector port='${http.port}' bindOnInit="false"/>

        <Engine defaultHost='localhost' name='Catalina'>
            <Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="x-forwarded-proto"/>
            <Valve className="com.gopivotal.cloudfoundry.tomcat.logging.access.CloudFoundryAccessLoggingValve"
                   pattern='[ACCESS] %h %l %u %t "%r" %s %b %{X-Vcap-Request-Id}i' enabled="${access.logging.enabled}"/>
            <Host name='localhost'>
                <Listener className="com.gopivotal.cloudfoundry.tomcat.lifecycle.ApplicationStartupFailureDetectingLifecycleListener"/>
            </Host>
        </Engine>
    </Service>

</Server>

<?xml version='1.0' encoding='utf-8'?>
<!--
  Cloud Foundry Java Buildpack
  Copyright (c) 2013 the original author or authors.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<Server port='-1'>

    <Listener className='org.apache.catalina.core.JasperListener'/>

    <Service name='Catalina'>
        <Connector port='${http.port}' bindOnInit="false"/>

        <Engine defaultHost='localhost' name='Catalina'>
            <Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="x-forwarded-proto"/>
            <Valve className="com.gopivotal.cloudfoundry.tomcat.logging.access.CloudFoundryAccessLoggingValve"
                   pattern='[ACCESS] %h %l %t %D %F %B %S vcap_request_id:%{X-Vcap-Request-Id}i' enabled="${access.logging.enabled}"/>
            <Host name='localhost'>
                <Listener className="com.gopivotal.cloudfoundry.tomcat.lifecycle.ApplicationStartupFailureDetectingLifecycleListener"/>
            </Host>
        </Engine>
    </Service>

</Server>

Change the default Access Log pattern in Tomcat
Change the default Access Log pattern in Tomcat

From GitHub issue #57. The current access logging pattern isn't as useful as it
could be. The logs will often be viewed alongside with the Router logs and
should provide complementing information and not overlap with it.

[#74837854]
