icm/HTTP/logging_<xx>

Use

You use this parameter to control the HTTP logging in the ICM (or Web dispatcher) if the ICM is functioning as a server. If the ICM has the client role, you use parameter icm/HTTP/logging_client_<xx> to log the HTTP requests.

More information about logging: Logging in the ICM.

Structure

Work area

Internet Communication Manager, SAP Web Dispatcher

Unit

Character string

Standard value

-

Dynamically changeable

No

Value Range and Syntax

This parameter has the following syntax:

icm/HTTP/logging_<xx> =  PREFIX=<URL-Präfix>,  
LOGFILE=<Name der Log-Datei> [, LOGFORMAT=<Format der Einträge>,
 FILTER=SAPSMD, MAXSIZEKB=<max. Größe der Log-Datei in KBytes>, 
SWITCHTF=<Optionen für neue Trace-Datei>, FILEWRAP=on]

This is explained below.

PREFIX

URL prefix that is called for this HTTP subhandler (for example, /).

For more information, see: Processing HTTP Requests

LOGFILE

Name of the output file in the file system.

With each restart the ICM checks whether the file specified as the log file exists. If it does it continues to write to this file, if it does not, it creates a new file.

You can attach another timestamp to the actual file name. The options below are available for specifying the log file.

%d

Day of the month (1-31)

%m

Month (1-12)

%y

Year, in the format YYYY

%h

Hour (0-23)

%t

Minute (0-59)

%s

Second (0-59)

%%

% character

LOGFORMAT

There are the following predefined formats for log files:

  • CLF

    Common log file format:

    10.18.104.36 - - [15/Oct/2005:16:18:35 +0100] "GET /dummy?para=100&user=sap HTTP/1.0" 200 86

  • CLFMOD

    Modifiied common log file format: The form fields and URI parameters are not written to the trace file (for security reasons these values are not saved to the log file.) Example from above:

       10.18.104.36 - - [15/Oct/2005:16:18:35 +0100] "GET /dummy HTTP/1.0" 200 86

  • SAP

    SAP log file format - here the processing time in milliseconds in the application server is also logged:

       [15/Oct/2005:15:41:35 +0100] 10.18.104.36 - - "GET /dummy HTTP/1.0" 200 86 10

  • SAPSMD

    Log format for tracking HTTP requests using the HTTP header field X Correlation ID:

    [15/Oct/2005:15:41:35 +0100] - "GET /dummy HTTP/1.0" 200 86 [10] h[A7594F39ED9F7C41BABA7397F8070718-1-5] |

If you want to use another format, you can configure this using the format string.

You can use the following place holders for this:

Properties of Request and Response

%b

Length of the response in bytes

%r0 or %r

1. Line of an HTTP request with the original path and form fields: For example, GET /sap(bD1kZSZjPTAwMA==)/bc/ping?lang=de HTTP/1.0

%r1

1. Line of an HTTP request with the original path without form fields: For example, GET /sap(bD1kZSZjPTAwMA==)/bc/ping HTTP/1.0

%r2

1. Line of an HTTP request with URL-decoded path without form fields: For example, GET /sap/bc/ping HTTP/1.0

%f

Name of requested object without form fields

%U

Whole URI of a request (with form fields)

%s

OK code of the response

%p0

Whole original URI of a request (with form fields), equivalent to %U

%p1

Whole original URI of a request (without form fields)

%p2

URL-decoded path without form fields, equivalent to %f

%p3

URL-decoded path with form fields

%{name}i

Name of a request header field, e.g. %{user-agent}i

%{name}o

Name of a response header field, e.g. %{server}o

%{cookie}c

Output of a request cookie

%{cookie}c

Output of a response cookie

%{form field name}

Name of a request form field, for example, %{sap-client{F

%T

Duration of a request in seconds

%L

The duration of a request in milliseconds

%j

Protocol: HTTP or HTTPS

Hosts and Ports

%h

Name of the remote host (the client, such as the browser)

%h0

Like %h

%h1

If the header field x-forwarded-for is set, this is the value of the header field, otherwise it is the name of the host directly in front of the ICM (or the Web dispatcher), that is, the client, for example, the browser.

%H

Name of local host

%V

Fully-qualified host name (FQHN) of the server (value of parameter icm/host_name_full or FQHN of the operating system).

%v

Name of the virtual host (IP address or name of the server with which the client is linked)

%a

IP address of the remote host

%S

Local port name or service

Other

%l

Specifies the Remote Log name. This name is the result of an IDENT query to the client. This only works if the identity check is activated there.

%u

User name of 401 authentication

For more information, see: User Authentication and Single Sign-On.

%t

Time specification in CLF format: [15/Dec/2000:16:18:35 +0100]

Performance is significantly better when predefined log file formats are used rather than your own format strings, as with predefined formats each element of the format string has to be determined and output separately.

FILTER

The filter property specifies that a HTTP request is logged only when a certain header field is in the request. If you set FILTER=SAPSMD, a HTTP request is logged only if the HTTP contains the HTTP header field X-CorrelationId.

MAXSIZEKB

MAXSIZEKB is the maximum size of the log file in kilobytes.

If this size is exceeded, the current file is closed and a new one (with a new name) is opened.

The new file name is unique (this is achieved by specifying time and date fields, see above), or else is made unique by adding _xx to the end (where xx is a number increasing from 0).

If FILEWRAP=on was selected, no new file is opened (see below).

SWITCHTF

A new log file can not only be created if the file has reached a certain size, but also when the time data changes:

Hour

A new log file is opened every hour

Day

A new log file is opened every day

Month

A new log file is opened every month

FILEWRAP

If FILEWRAP=on is active, every time a new file is opened, the existing log file is reset and overwritten. Therefore, there is always only one log file with the current log data.

If you omit this option, once the size has been exceeded a new file is written (see above).

More Information

Note the following documentation associated with this parameter:

Generic profile parameters with the ending _<xx>

icm/HTTP/logging_Client_<xx>

Logging in the ICM

HTTP Logging