Enabling access logging

Use access logs to get information from HTTP transport channel requests. You can enable access logging with the WebSphere® Application Server administrative console.

Procedure

  1. Enable access logging for National Center for Supercomputing Applications (NCSA) on the NCSA access and HTTP error logging page.

    An NCSA access log contains a record of all inbound client requests that an HTTP transport channel handles. All messages in the log are in NCSA format.

    [z/OS]An FRCA log is a specialized NCSA access log that can be created only if you are running the product on z/OS®. An FRCA log contains a record of all inbound client requests that the Fast Response Cache Accelerator handles. All messages in an FRCA log are in NCSA format.

    1. Click Servers > Server Types > WebSphere application servers > server_name > NCSA access and HTTP error logging.
    2. Select Enable logging service at server start-up.
    3. Ensure that Enable access logging is selected.
    4. Optional: Increase the maximum number of historical files. A suggested number is 3.
    5. Save your changes.

    For information about the console page, see HTTP error, FRCA, and NCSA access log settings.

  2. Enable access logging for the web container transport chains.
    1. Go to the HTTP channel settings page for a transport chain. Click Servers > Server Types > WebSphere application servers > server_name > Web Container Settings > Web container transport chains > chain_name > HTTP_channel_name.

      For example, click Servers > Server Types > WebSphere application servers > server1 > Web Container Settings > Web container transport chains > WCInboundDefault > HTTP inbound channel (HTTP_3).

    2. Under Logging, configure NCSA access logging.
      1. Select Enable logging.
      2. Under NCSA Access logging, select Use chain-specific logging.
      3. Ensure that Enable access logging is selected.
      4. For Access log file path, specify the file path to the http_access.log file.
      5. For Access log maximum size, specify the maximum size of the NCSA log in megabytes. 500 MB is suggested.
      6. For Maximum number of historical files, specify the maximum number of historical files to keep. 3 is suggested.
      7. Save your changes directly to the master configurations.
    3. Return to the Web container transport chains page and then enable access logging for other transport chains as needed.
  3. Optional: Configure an accessLogFormat custom property for a web container transport chain.
    1. Go to the custom properties page for the wanted transport chain. Click Servers > Server Types > WebSphere application servers > server_name > Web Container Settings > Web container transport chains > chain_name > HTTP_channel_name > Custom properties.

      For example, click Servers > Server Types > WebSphere application servers > server1 > Web Container Settings > Web container transport chains > WCInboundAdminSecure > HTTP inbound channel (HTTP_3) > Custom properties.

    2. Create an accessLogFormat custom property.
      1. Click New.
      2. Set Name to accessLogFormat.
      3. Set Value to, for example, %h %i %u %t "%r" %s %b %D

        or, in version 8.5.5.6 and later : %h %i %u %t "%r" %s %b %D %{R}W

      4. Save your changes.

      For variable descriptions, see HTTP transport channel custom properties.

  4. Restart your server.