Using Enhanced Logging for Messaging
About Enhanced Logging for Messaging
Enhanced logging for messaging is a configurable feature that instructs Integration Server to write detailed log entries when sending or receiving and processing messages. The detailed logging, referred to as enhanced logging, makes it possible to track an individual message across your Integration Servers from the time the message is published through the time a trigger receives, processes, and acknowledges the message.
Each log message presents information about the message progress in a consistent way, making it possible to track the progress of the message through Integration Server. Most importantly, whenever possible, enhanced logging entries include a unique identifier for the message being published or consumed. Being able to track individual messages can help in debugging issues in your messaging solution.
Integration Server provides many configuration options for the enhanced messaging logging. These options can help focus the log entries on particular areas of your messaging implementation as well as limit the impact of enhanced logging on performance. For example, you configure enhanced logging for an individual messaging connection alias and not the entire Integration Server. For each alias you can specify whether Integration Server generates additional logging for all message consumers and/or producers or just specific message consumers and/or producers. You can also specify whether or not the enhanced messaging logging is verbose by setting a logging level.
Enhanced logging is available for JMS messaging and webMethods messaging only. It is not available for MQTT messaging.
What Is in Log Entries for Enhanced Logging?
Enhanced logging entries include details about the message for which the log entry is being written in addition to the typical time stamp and log message text that appear in other log entries.
These message details can include a UUID, the message ID assigned by the provider, and the connection alias used to send or receive the messages. Each log entry includes the message details in the same order, which may be helpful when reviewing the log entries.
The message information that appears in the log entry depends on the point in publishing or subscribing at which Integration Server writes the log entry. For example, a log entry about sending a message would not include the provider ID for the message because the messaging provider has not yet received the message. A log entry about writing a message to the client side queue would not include a trigger name. A log entry for preparing to publish a document to Universal Messaging does not include a UUID if one was not specified in the document or the publishing service does not allow custom UUIDs because Integration Server has not yet generated the UUID.
The following table identifies and describes the possible information in each enhanced logging entry for a message being sent or received:
| Message property | Description |
|---|---|
| UUID | Universally
unique identifier for the message being sent or received.
|
| Messaging connection alias | Name
of the messaging connection alias associated with the sent or received
message.
|
| Destination | Destination
to which the message was sent.
|
| Message ID | The ID
assigned to the message by the messaging provider.
|
| Trigger name | Name of the trigger that received the message. |
Enhanced logging entries written to the server.log are not identical to the enhanced logging entries written to the dedicated messaging log. The formats used by the server.log entries and by the messaging log entries are different. However the server.log entries and messaging log entries contain the same log message text and message properties. For more information about directing enhanced logging to the server.log or the messaging log, see Using the Messaging Log or the Server Log for Enhanced Logging.
Logging Levels for Enhanced Messaging Logging
The number of log entries written for a published or received message as part of enhanced logging depends on the logging level. For log entries written to the messaging log, the logging level for the messaging audit logger determines the logging level. For messages written to the server.log, the logging level for the 0168 Messaging (Enhanced Logging) server log facility determines the logging level.
To generate enhanced logging for messaging, the logging level, must be set to one of the levels listed in the following table:
| At this level | Integration Server logs entries for |
|---|---|
| Info | Main sending and receiving actions such as success or failure of sending, receiving, and processing messages. A logging level of Info is considered standard logging for enhanced messaging logging. |
| Debug | Details of sending and receiving activities such as preprocessing and message acknowledgment. A logging level of Debug is considered verbose logging for enhanced messaging logging. |
| Trace | Further details of
sending and reeving activities, such as the start and end of polling
the messaging provider for additional messages. Note: Trace-level messages are provided for
JMS messaging only.
|
Using the Messaging Log or the Server Log for Enhanced Logging
When you configure a messaging connection alias to use enhanced logging, you can specify that Integration Server write the log entries to the server.log or the messaging log.
The messaging log is an audit log exclusively for enhanced logging entries written for sending and receiving of messages with Integration Server. The messaging audit log is formatted to align the log entries, including the log message text and message properties, into columns. This may make the log easier to use.
The server log is a journal log and contains log entries for all of the server log facilities. You can view the messaging log and server log in Integration Server Administrator or with text editors.
You can use the messaging log or the server log as the destination for enhanced log entries. However, you cannot set the same messaging connection alias to write to both locations.
Configuring Enhanced Logging for Messaging
Integration Server provides many configuration options for enhanced logging. The granularity of the options makes it possible for Integration Server to generate logging data more tailored to your needs. For example, perhaps you want to see logging for all messages sent using a particular messaging connection alias. Or maybe you want a narrower focus in the logging entries and only want to see log entries for messages sent by a messaging connection alias to a particular destination.
When configuring enhanced logging for messaging, you need to decide:
- Which
messaging connection aliases for which you want to use enhanced
logging. Enhanced logging is configured on a per messaging connection
alias basis. You can configure enhanced logging for Universal Messaging connection alias for webMethods messaging or JMS connection alias.
For information about configuring enhanced logging for a Universal Messaging connection alias, see Creating a Universal Messaging Connection Alias.
For information about configuring enhanced logging for a JMS connection alias, see Creating a JMS Connection Alias.
- Whether Integration Server writes enhanced logging entries to the server.log or the messaging log.
- Whether to generate enhanced logging for message consumers and/or producers that use the messaging connection alias. You can further limit the message producers for which Integration Server performs enhanced logging by identify the specific destinations for which you want additional logging. Integration Server writes enhanced logging only for messages sent to the specific destinations using the messaging connection alias. Similarly, you can also instruct Integration Server to generate additional logging for all triggers that use the messaging connection alias to receive messages or just specific triggers.
- The
logging level for enhanced logging. Where you set the logging level
depends on whether Integration Server writes enhanced logging entries to the
messaging log or the server log.
- For the messaging log, you configure the logging level on the messaging audit logger. For information about configuring the messaging audit logger, see the webMethods Audit Logging Guide .
- For the server log, you configure the logging level for the 0168 Messaging (Enhanced Logging) server log facility. You must set the facility to at least the Info logging level for Integration Server to write enhanced logging entries. For information about configuring the server.log see Specifying Amount and Type of Information to Include in the Server Log.
Enhanced logging has a performance cost. The additional logging by Integration Server consumes resources and impacts performance negatively. The additional log entries can very quickly fill up disk space. Keep this information in mind when using enhanced logging for messaging.
Viewing the Messaging Log
About this task
Integration Server Administrator also provides the ability to search
the current messaging log for all entries that correspond to a particular
UUID. On the Logs > Messaging page, click Basic to
search the messaging log for all entries that contain a specified
UUID. Alternatively, click
in the row for the UUID for which you want to view
log entries.
For more information about viewing the messaging log in Integration Server Administrator, View the Messaging Log .