Show TOC

 Logging in Common Log File FormatLocate this document in the navigation structure

Use

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 J2EE Engine 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 Visual Administrator tool (the Runtime screen of the LogViewer Service). The corresponding logs are located in the Cluster → Server<ID> → .\log → system → httpaccess → responses.trc node of the tree displayed by the Log Viewer. For more information about using the Log Viewer tool, see Log Viewer .

The HTTP access log activity is controlled by the overall logging framework of the J2EE Engine 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.

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, a - (minus) sign is placed in the field.

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, a - (minus) sign is placed in the field.

[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 Cluster → Server<ID> → .\log → system → httpaccess → responses-clf.trc 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 J2EE Engine, and 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 J2EE Engine instead).

Prerequisites

In order 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 Enabling Logging on a Virtual Host .

Procedure

Use the Visual Administrator to set up the HTTP Provider Service to log in Common Log File Format. Proceed as follows:

  1. Open the Properties tab of the HTTP Provider Service on server process.
  2. Assign value trueto the LogCLF property.
  3. To add the new value to the list of properties, choose Update.
  4. To save your settings, choose  (Save Properties).