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.
You can find general information about logging in Logging in the ICM.
Work area |
Internet Communication Manager, SAP Web Dispatcher |
Unit |
Character string |
Standard value |
- |
Dynamically changeable |
Local and on all servers |
This parameter has the following syntax:
icm/HTTP/logging_<xx> = PREFIX=<URL prefix>, LOGFILE=<log file name> [, LOGFORMAT=<entry format>, MAXSIZEKB=<maximum size of the log file in KBytes>, SWITCHTF=<options for the new trace file>, FILEWRAP=on]
This is explained below.
URL prefix that is called for this HTTP subhandler (for example, “/”).(See also Processing HTTP Requests.)
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 |
If you want to specify the date and time in the file name, you can set option of parameter icm/HTTP/logging_<xx> to the following: LOGFILE=access_log-%d-%m-%y_%h:%t:%s
This creates a log file with the name: access_log-15-10-2005_16:51:53
If you want a log file to be written monthly, set the name to: LOGFILE=access_log-%y-%m. This creates a log file with the name: access_log-2005-10.
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
Modified 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
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 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 original path and 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, for example, %{user-agent}i |
|
%{name}o |
Name of a response header field, for example, %{server}o |
|
%{cookie}c |
Output of a request cookie |
|
%{cookie}c |
Output of a response cookie |
|
%{form field name}F |
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 |
|
Miscellaneous |
||
%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 |
|
%t |
Time in CLF format: [15/Dec/2000:16:18:35 +0100] |
|
The CLF format is created by the following string: %h %l %u %t "%r" %s %b.
The CLFMOD format is created by the following string: %h %l %u %t "%r2" %s %b.
The SAP format is created by the following string: %t %h %u - \"%r2\" %s %b %L.
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.
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).
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 |
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).
You can use on or ON, but you cannot use a mixture of upper and lower case.
PREFIX=/, LOGFILE=dev_http_access_log, SWITCHTF=day, FILEWRAP=on
Note the following documentation:
Generic Profile Parameters with the Ending _<xx>