Operation: Read Messages
The Read Messages
operation retrieves a list of all stored log messages for a given process to view the history of messages (including timestamp, message type and message content) and to troubleshoot issues that occurred. This operation expects a PID
or PUID
as input from a process with the operation Log Message
or Log Batch Message
.
Attributes can be used to filter for log messages:
- The
Message
attribute can be used to filter for log messages with the specified search text. - The
Key
attribute can be used to filter for log messages with the specified key. - The
Level
attribute can be used to filter for log messages with the specified level.
Input
The adapter expects the following XML structure as input:
Example
<Element>
<PID></PID>
<PUID>D4813FA1-EC9E-475D-81EB-3B69026346E5</PUID>
<Message>age</Message>
<Key>A</Key>
<Level>INFO</Level>
</Element>
The following elements can be included in the input:
Attribute | Description |
---|---|
PID | ID of the process for which the messages are retrieved |
PUID | PUID of the process for which the messages are retrieved |
Message | The If the Possible value: Any string (string, case-insensitive). |
Level | The If the Possible value: Any string (string, case-insensitive). |
Key | The If the Possible value: Any string (string, case-insensitive). |
Output
The adapter generates an XML document as output with PID, PUID, timestamp, key, level, and content of the log message.
Example
<Data>
<OperationReadMessages>
<PID>1676970458689761392</PID>
<PUID>D4813FA1-EC9E-475D-81EB-3B69026346E5</PUID>
<Timestamp>2023-02-21 10:16:40.540</Timestamp>
<Key>A</Key>
<Message>Log Message 1</Message>
<Level>INFO</Level>
</OperationReadMessages>
<OperationReadMessages>
<PID>1676970458689761392</PID>
<PUID>D4813FA1-EC9E-475D-81EB-3B69026346E5</PUID>
<Timestamp>2023-02-21 10:16:40.546</Timestamp>
<Key>A</Key>
<Message>Log Message 2</Message>
<Level>INFO</Level>
</OperationReadMessages>
</Data>
The following elements can be included in the output:
Attribute | Description |
---|---|
PID | ID of the process for which the messages are retrieved |
PUID | PUID of the process for which the messages are retrieved |
Timestamp | Timestamp of the message |
Key | Key of the log message, defined in the key parameter of the X4 BAM Log Adapter or the input of the operation Log Batch Message |
Message | Log message generated by the operation Log Message or Log Batch Message |
Level | Level of the log message, defined in the parameter of the X4 BAM Log Adapter or the input of the operation Log Batch Message |