There are two possibilities to configure message logging. The first option is to configure Message Logging globally, that means, for all scenarios running on the PI landscape.
You can log messages either in the pipeline of the Advanced Adapter Engine or within the processing of a chain of modules of an adapter.
To configure Message Logging in SAP NetWeaver Administrator, follow the high-level description:
Call SAP NetWeaver Administrator.
Choose Configuration → Infrastructure → Java System Properties.
On the Services tab, select XPI Adapter: XI.
Enter values for the xiadapter.logger.conf property. Enter values according to the following syntax:<processing step> = <condition>. You can separate multiple expressions like that by commas.
As Processing step, you can specify one of the following steps within the pipeline processing for asynchronous and synchronous request messages:
Specifications of the Processing Step
Processing Step | Description |
|---|
Message Preparation (parameter BI) | After sender adapter processing, the message is handed over to the messaging system and prepared for further processing. |
Receiver determination (parameter MS) | The receivers of the message are evaluated based on the configuration settings in the corresponding Integrated Configuration in the Integration Directory |
Mapping (parameter AM) | The mapping is performed based on the configuration settings in the corresponding Integrated Configuration in the Integration Directory |
The message will be logged after the specified step.
For synchronous response messages, the mapping is executed before the message is handed over to the messaging system and Receiver determination is skipped because the receiver is already known. To be able to store the message before and after the mapping step, in case the logging is configured for the AM step, the response message will be logged just before the mapping (because it comes from the synchronous receiver).
Specifications of the Synchronous Processing Step
Processing Step | Description |
|---|
Mapping (parameter AM) | The mapping is performed based on the configuration settings in the corresponding Integrated Configuration in the Integration Directory. (message is logged before this step) |
Message Preparation (parameter BI) | The message is prepared and handed over to the messaging system for further processing. |
The figure above shows the processing steps for synchronous messages.
The figure above shows the processing steps for asynchronous messages.
Use the values from the table to specify the logging conditions:
Specify the Logging Conditions
Digit | Condition |
|---|
1 | Asynchronous messages are logged. |
2 | Synchronous messages are logged. |
3 | Synchronous and asynchronous messages are logged. |
5 | Only asynchronous error messages are logged. |
6 | Only synchronous error messages are logged. |
7 | Synchronous and asynchronous error messages are logged. |
9 | As setting 1, with the business content (payload) hidden. |
10 | As setting 2, with the business content (payload) hidden. |
11 | As setting 3, with the business content (payload) hidden. |
13 | As setting 5, with the business content (payload) hidden. |
14 | As setting 6, with the business content (payload) hidden. |
15 | As setting 7, with the business content (payload) hidden. |
As default, no value is assigned, which means that messages will not be logged.
Example:
AM=14 means: synchronous error messages are logged between mapping and schema validation and the payload is hidden.
Configuring Message Logging in Case of Errors
To activate logging in case of errors in any case, follow the high-level description:
Start SAP NetWeaver Administrator from the following page: http://<host>:<port>.
Choose SAP NetWeaver Administrator.
Choose Configuration → Infrastructure → Java System Properties.
In the Services tab, search for XPI Service: Messaging System.
On the Properties tab (under Extended Details), search for messaging.system.statusLoggerConf.
To specify message logging behavior, choose Modify. In the field Enter Custom Values, enter the corresponding values according to the following syntax:
<log state>, <content handling>
As log state, you can specify one of the following values:
Log State
Value | Description |
|---|
Error | Log messages in case of errors. |
None | No logging of messages. |
To specify the handling of business content, you use one of the following values:
Handling of Business Content
Value | Description |
|---|
Full | If logging is enabled, log messages with business content (payload). |
Headers | If logging is enabled, log messages without business content (payload). |
As default, the value Error, Full is assigned, which means that messages are logged including business content in case of errors.
The location SC is used for the logged message version. This log message is also visible in PI overview monitoring.
Configure Message Logging Within Adapter Module Chain
You can log messages at arbitrary stations within the processing of a module chain of an adapter. That means, you can define your own processing steps at which logging is to take place.
Note
This kind of message logging is only feasible in scenarios where adapter modules are involved in message processing.
You configure this kind of message logging in Integration Directory at the communication channel that is defined for the corresponding adapter.
To configure this kind of Message Logging, open the Integration Directory and select the communication channel that is defined for the corresponding adapter. Follow the high-level description:
Open the Integration Directory.
Open the communication channel.
Open the Module tab.
Under Processing Sequence, the modules are listed which are processed by the adapter.
Enter a new row between the modules where the message should be logged.
In column Module Name, enter the string MessageLoggerModule.
To specify the logging details, select module MessageLoggerModule and enter the corresponding parameters and parameter values. (see table below).
Save and activate the communication channel.
Log Parameters
Parameter Name | Description | Parameter Values |
|---|
log.condition | Specifies logging condition | You can assign an integer derived out of the following digits: 2 (synchronous messages are logged) 4 (only error messages are logged) 8 (business content is hidden)
|
log.location | Name of logging steps | You can enter a name for the station or processing step within the module chain where the message should be logged. When you display logged messages in monitoring, the processing step is displayed under Message Versions. Note that the module name must be prefixed with AF_Modules. |