Configure access logging for internal Web server HTTP transport
To log information about client HTTP requests, the internal Web server HTTP transport supports access logging. To configure access logging, add these custom properties to one of the HTTP transports in your Web container:
Property name |
Valid Values |
Description |
Default |
Scope |
AccessLogDisable |
true/false |
Enable or disable access logging |
true (logging disabled) |
Virtual/Global |
AccessLog |
filename |
The location of the log file |
logs/app_server/http_access.log1 |
|
1 Relative paths are qualified from the root directory of your instance. For example, for the default application server in the default instance of WebSphere Application Server - Express, the default location for the log file is /QIBM/UserData/WebAS5/Base/default/logs/server1/http_access.log.
Access log entries should have this format:
hostname user_agent [local_time -status_code]
thread_id http_request status_code bytecount
where:
- hostname is the name or IP address of the client
- user_agent is the type of application (for example, Internet Explorer or Netscape) that the client uses to connect to your application server
- local_time is the time that the server receives the request
- status_code is the status of the incoming request
- thread_id is the ID of the thread that processes the request
- http_request is the URL that the client requests
- bytecount is the number of bytes contained in the body of the request
Enable access logging
To enable access logging, follow these steps:
- Start the administrative console.
- In the topology tree, expand Servers and click Application Servers.
- Click the name of the application server for which you want to disable HTTP transport logging.
- On the application server page, click Web Container under Additional Properties.
- On the Web Container page, click HTTP Transports.
- On the HTTP Transports page, select one of the HTTP transports.
- On the transport page, click Custom Properties.
- To enable error logging, add the AccessLogDisable custom property to one of the HTTP transports in your Web container and set the value to false:
- Click New.
- For the property name, specify AccessLogDisable.
- For the value, specify false.
- Click OK.
- (Optional) Specify the AccessLog custom property:
- Click New.
- For the property name, specify AccessLog.
- For the value, specify a file name.
- Click OK.
- Save the configuration.
- Restart the application server.
Disable access logging
To disable access logging, follow these steps:
- Start the administrative console.
- In the topology tree, expand Servers and click Application Servers.
- Click the name of the application server for which you want to disable HTTP transport logging.
- On the application server page, click Web Container under Additional Properties.
- On the Web Container page, click HTTP Transports.
- On the HTTP Transports page, click the transport that includes the AccessLogDisable property.
- On the transport page, click Custom Properties.
- Click the ErrorLogDisable custom property.
- On the property page, specify a valu of true for the AccessLogDisable property.
- Save the configuration.
- Restart the application server.