How to Configure Operational Status Logging
New in Apache Qpid 0.6 Java Broker is Operational Status Logging. The design overview can be found here which details all the proposed new logging features.
The Status Logging allows for a range of new log statements which provide details about the various state changes that occur within the broker.
Enabling Status Updates
The new status updates are controlled by the following new configuration entry.
If the 'status-updates' entry is missing then Apache Qpid Java broker will default logging on. The value of 'on' is not case sensitive but any other string will disable updates.
The addition of the new logging format also provided the opportunity to allow localisation of the log messages. Currently we have only completed the mapping US English, which therefore is the default.
As the broker starts up a number of standard messages are logged. These messages will be logged in the VM's default locale, if a mapping is available. Once the broker configuration file is read then any locale specified in the configuration file will enabled and adjust the future log statements.
New Log Messages
There are a number of new log messages generated when status logging is enabled they are broken down in to 10 categories. Each of the messages are detailed below in the Message Section.
Currently the messages are logged as part of the default log4j configuration. The default broker log4j configuration will produce messages in this format.
The message is composed in the following way:
The display of the first three entries '<date-time> INFO [qpid.message]' depend on your particular log4j configuration however you will always get the final message section:
There are a number of Actors that can perform loggging, each has a different format which gives additional information about the thread that is performing the logging.
On broker startup and shutdown messages logged about the state of the broker will use the Broker actor.
When an operation is performed via the JMX interfaces the connection Actor will provide details of the connection that performed the action.
This is used when the queue is processing the messages on the queue. Currently only SUB-1003 messages will be logged by this actor
When a subscription is acting on the broker then it will log messages. Currently SUB-1003 suspend and SUB-1002 messages are the only one that this actor will provide
There are a number of formats that this actor will present depending on the information available. On initial connection open only the remote ip is available. After authentication the username and vhost are available.
Most logging will be of the latter type were the channel id is also present.
The definitive list of messages is the property file found here. For readability the list as been reproduced here with additional detail about the various parameterised values, shown like this '<value>', and optional values, shown like '[optional]'.