-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat Fuse
Chapter 11. Connect to an integration’s log
For each integration step, Fuse Online provides the following activity information:
- The date and time that the step was executed
- How long it took to execute the step
- Whether execution was successful
- The error message if execution was not successful
To view this information in Fuse Online, display the integration’s summary and then click the Activity tab. See also: Viewing integration activity information.
To obtain further details about integration execution, you can log information about the messages that an integration processes by adding a log step and/or a log connection to an integration.
11.1. Comparison of log steps and log connections
To log information about the messages that an integration processes, you can add one or more log steps to an integration and/or you can add one or more log connections to an integration.
A log connection cannot be an integration’s start connection. Typically, a log connection is most useful as an integration’s finish connection.
The following table indicates whether a log step or a log connection can do what you want.
To do this | Add a log step | Add a log connection |
---|---|---|
Log the ID of each message. (Internally, this ID is the exchange ID.) |
| |
Log the headers in each message. |
|
|
Log the body of each message. |
|
|
Log text that you specify for each message. |
|
|
Specify a Camel Simple expression that Fuse Online resolves to text for each message and then sends to the log. |
| |
Finish an integration. |
| |
Log messages at the level you specify ( |
|
Additional resources
- Add a log step to an integration in Integrating Applications with Fuse Online.
- Add a log connection to an integration
11.2. Add a log connection to an integration
To log information about the messages that an integration processes, add one or more log connections to the integration. A log connection takes each input message from the previous step in the integration, sends the details that you specify to the integration’s log, and passes the message to the next step in the integration.
Fuse Online provides a log connection that you can add to any number of integrations, and that you can add any number of times to the same integration. You do not need to create a log connection unless you inadvertently delete the provided log connection.
Prerequisites
- You have chosen to add a log connection rather than a log step to an integration. For help with this, see Comparison of log step and log connection.
- You must be creating or editing an integration. If you are creating an integration then the integration must already have its start connection.
- Fuse Online is prompting you to choose a new integration’s finish connection or is prompting you to choose the connection that you want to add to an integration.
Procedure
Click the Log connection.
Fuse Online comes with the Log connection; you do not need to have created a log connection yourself. However, if you inadvertently deleted the provided connection and created a new log connection, then you might have given it another name.
- On the Choose an Action page, click Simple Logger.
Accept the INFO log level, or click in the log level input box to select a different level for sending information to the log.
Each message that an integration handles has a log level field whose value is
ERROR
,WARN
,INFO
,DEBUG
, orTRACE
. The table below indicates the behavior for each log level.Select this level To log information for messages with this log level ERROR
ERROR
WARN
ERROR
,WARN
INFO
ERROR
,WARN
,INFO
DEBUG
ERROR
,WARN
,INFO
,DEBUG
TRACE
ERROR
,WARN
,INFO
,DEBUG
,TRACE
OFF
No logging. After creating and testing an integration, you might no longer need the logging provided by the log connection. Edit the integration, edit its log connection to select OFF, and re-publish the integration.
Select one or more checkboxes to indicate what information to send to the log for each message. Choices include:
- Message ID
- Message headers
- Message body
If you do not select any checkboxes, then for each logged message, Fuse Online logs several internal IDs, how long it took to process the message, whether there was an error, and an error message if there was one. This is comparable to the information that Fuse Online provides for each integration step, which you can view in the Activity tab of the integration summary.
- Click Done to add the log connection to the integration.
Additional resource
11.3. Create a replacement log connection
Fuse Online provides a log connection that you can add to an integration to log information about each message that an integration processes. If you inadvertently delete the provided log connection, then you can create a new log connection from the Log connector that Fuse Online provides.
Procedure
- In Fuse Online, in the left navigation panel, click Connections.
- In the upper right, click Create Connection.
- Click the Log connector.
-
In the Connection Name field, enter a name for the connection, for example, enter
Log
. - Optionally, enter a description for this connection if you need to distinguish it.
- In the upper right, click Create. This displays the available connections and you can see your new log connection.