Configuring the file system logger interceptor
The file system logger interceptor enables IBM® z/OS® Connect users to log information about API and service requests in a file. It is not called for API requester invocations.
About this task
zosConnect-2.0 Applies to zosConnect-2.0.
This function is available when you configure z/OS Connect. The file system logger writes UTF-8 data (not EBCDIC). In z/OS Explorer, set the log file as to view the file in its original ASCII format.
The file that is written by the interceptor can be tagged as ASCII in USS by using the chtag command. For example,
chtag -t -c ISO8859-1 input.log
To view the data in an EBCIDIC environment, the data can be converted to EBCDIC data by using the USS chtag command. For example,
iconv -f ISO8859-1 -t IBM-1047 input.log > output.log
Note:
z/OS Connect does not automatically delete the files
that are created by the file system logger interceptor. Users are responsible for managing the files
that are created.
| Entry | Description |
|---|---|
| DateTime | The date and time that is calculated by the logger interceptor before the service invocation and after the service response. From 3.0.16.0, the time is changed from 12 to 24 hour format and extended to millisecond precision. |
| Headers | Available from 3.0.74, the headers that are associated with the request or
response. This information is only logged for headers that are specified by the
apiProviderRequestHeaders and apiProviderResponseHeaders settings
in the configuration. |
| LocalAddress | The Internet Protocol (IP) address of the interface on which the request was received. |
| MessageData | A request or response payload. |
| MessageSize | The character size of the payload. |
| MessageType | Identifies whether the payload is from a request or a response. |
| RemoteAddress | The Internet Protocol (IP) address of the client who originated the request or last proxy that sent the request. |
| RequestID | The request tracking ID generated by z/OS Connect. |
| RequestURL | Available from 3.0.74, the request method, URL, and query parameters
associated with the request or response. This information is only logged when
requestUrl is set to true in the configuration. |
| ThreadID | The ID of the thread under which the service request is being processed. |
| UserName | The user name for which the request is being processed. |
*****************************************************************************
ServerName: myServer
*****************************************************************************
DateTime:2018-11-27 15:14:56:321 | ThreadId:47 | UserName:Fred | RequestID:0000000000000001000000000000000000000000000000 |
RemoteAddress:127.0.0.1 | LocalAddress:127.0.0.1
MessageType:REQUEST
MessageSize:27
MessageData:{"payload":"HELLO_SERVICE"}
Request URL: PUT https://localhost/zosConnect/services/HelloService?action=invoke
Headers: Content-Type:application/json
DateTime:2018-11-27 15:14:57:867 | ThreadId:47 | UserName:Fred | RequestID:0000000000000001000000000000000000000000000000 |
RemoteAddress:127.0.0.1 | LocalAddress:127.0.0.1
MessageType:RESPONSE
MessageSize:26
MessageData:{"payload":"HELLO_CALLER"}
Request URL: PUT https://localhost/zosConnect/services/HelloService?action=invoke
Headers: Content-Type:application/json