For HTTP access logging, we recommend using the ICM access log
Logging in SAP-proprietary Format
The HTTP Provider Service logs information about requests and responses in an HTTP access log file. By default, the log messages in this log file have an SAP-proprietary format. Each line contains the following fields:
[date] - client-ip : request return-code bytes
Here is the description of each field:
Field Name |
Description |
---|---|
[date] |
Date and time of the request. |
client-ip |
The IP address of the remote host. |
request |
The request line (exactly as it came from the client). It consists of the file name and the HTTP method used to retrieve it. |
return-code |
The HTTP response status code returned to the client. |
bytes |
The number of bytes transferred. |
You can configure the AS Java to log additional information using other properties of the HTTP Provider Service. For more information, see Logging Additional Information .
You can view logs in the HTTP access log file using the Log Viewer that is integrated in the SAP NetWeaver Administrator tool (the Runtime screen of the LogViewer Service). The corresponding logs are located in the node of the tree displayed by the Log Viewer.
More information about using the Log Viewer tool: Log Viewing .
The HTTP access log activity is controlled by the overall logging framework of the AS Java through the /System/HttpAccess/Access logging category. By default, the severity of this category is set to Info . We recommend that you do not increase the severity as this practically disables the HTTP access log.
The same recommendation and limitation applies for ICM access log.
Logging in Common Log File Format
You can, however, configure your HTTP Provider Service to log information in the standard Common Log File Format (CLF). When logging in CLF, the log file contains the following fields separated by a space:
remotehost rfc931 authuser [date] " request " status bytes
Here is the description of each field:
Field Name |
Description |
---|---|
remotehost |
The remote host name or IP address. |
rfc931 |
The remote login name of the user. If it is not available, the field contains a - (minus) sign. |
authuser |
The user name, whose user is used for authentication. It is available only when accessing password-protected Web pages. If it is not available, the field contains a - (minus) sign. |
[date] |
Date and time of the request. |
" request " |
The request line (exactly as it came from the client). It consists of the file name and the HTTP method used to retrieve it. |
status |
The HTTP response status code returned to the client. |
bytes |
The number of bytes transferred. |
An example of an entry in Common Log File Format:
127.0.0.1 - - [31/Oct/2002:10:46:34 +0200] " GET /catalog/index.html " 200 380
To view the logs in the CLF using the Log Viewer, you must open the
node of the tree displayed by the Log Viewer.If you are running an ABAP + Java installation of Web AS with the SAP Web Dispatcher as a load balancing solution, you can safely disable logging of HTTP requests and responses on the AS Java. Instead, use the corresponding CLF logs of the SAP Web Dispatcher. This also improves the HTTP communication performance. The only drawback of using the Web Dispatcher's CLF logs is that no information is available about the user executing the request (since the user is not authenticated on the Web Dispatcher, but on the AS Java instead).
To log any information in the HTTP access log file, logging must be enabled for your virtual hosts. You can configure this behavior at runtime as described in Configuring the General Properties .
Use the SAP NetWeaver Administrator to set up the HTTP Provider Service to log in Common Log File Format. Proceed as follows:
To modify the properties of the HTTP Provider Service using the SAP NetWeaver Administrator, use the Java System Properties function. For more information, see Java System Properties .
In the Services tab, select HTTP Provider Service.
On the Extended Details tab page, a list of all service properties is displayed.
Assign value true to the LogCLF property.
Choose Save Changes .