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
-
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.
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.
- Click Servers > Server Types > WebSphere application servers > server_name > NCSA access and HTTP error logging.
- Select Enable logging service at server start-up.
- Ensure that Enable access logging is selected.
- Optional: Increase the maximum number of historical files. A suggested number is 3.
- Save your changes.
For information about the console page, see HTTP error, FRCA, and NCSA access log settings.
-
Enable access logging for the web container transport chains.
-
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).
-
Under Logging, configure NCSA access logging.
- Select Enable logging.
- Under NCSA Access logging, select Use chain-specific logging.
- Ensure that Enable access logging is selected.
- For Access log file path, specify the file path to the http_access.log file.
- For Access log maximum size, specify the maximum size of the NCSA log in megabytes. 500 MB is suggested.
- For Maximum number of historical files, specify the maximum number of historical files to keep. 3 is suggested.
- Save your changes directly to the master configurations.
- Return to the Web container transport chains page and then enable access logging for other transport chains as needed.
-
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.
- Optional:
Configure an
accessLogFormat
custom property for a web container transport chain.-
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.
-
Create an
accessLogFormat
custom property.- Click New.
- Set Name to
accessLogFormat
. - 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
- Save your changes.
For variable descriptions, see HTTP transport channel custom properties.
-
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.
- Restart your server.