Liberty profile: HTTP access logging

You can configure access log settings for HTTP endpoints.

HTTP access log settings

An HTTP access log contains a record of all inbound client requests handled by HTTP endpoints. You can enable access logging from the HTTP server side, or in one of the following two modes: one log common to all endpoints, or one log for each endpoint.
Note: If you do not specify elements, the defaults are used. To see a list of the default attributes, see httpAccessLogging in the list of liberty configuration elements:Liberty profile: Configuration elements in the server.xml file.
  • Using a common log for all endpoints

    To enable logging for all endpoints using common settings, include httpAccessLogging as a top-level element in your server.xml file:

    <httpAccessLogging />
  • Using distinct logs for each endpoint:

    To enable logging for individual endpoints, use an accessLogging child element and specify a file path that does not conflict with other logs:

    <httpEndpoint id="defaultHttpEndpoint"> 
       <accessLogging filepath="${server.output.dir}/logs/http_defaultEndpoint_access.log"/> 
    </httpEndpoint>
  • Using logs from the HTTP server side:

    For a list of the available HTTP server side properties and their descriptions, see Apache Module mod_log_config.

HTTP access log format

For a list of the available log format properties and their descriptions, see the accessLogFormat configuration for the full profile in HTTP transport channel custom properties. This log format string is specified using the logFormat attribute of httpAcccessLogging or accessLogging elements in server.xml:

<httpAccessLogging logFormat="%h %u %{t}W "%r" %s %b"/>

or

<httpEndpoint id="defaultHttpEndpoint">
		<accessLogging filepath="${server.output.dir}/logs/http_defaultEndpoint_access.log"
                         logFormat="%h %i %u %t &quot;%r&quot; %s %b" />
	</httpEndpoint>

Icon that indicates the type of topic Reference topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-express-iseries&topic=rwlp_http_accesslogs
File name: rwlp_http_accesslogs.html