Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

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.

No Format
<broker>
    ...
    <status-updates>ON</status-updates>
    ...
</broker>

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.

Broker Locale

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.

No Format
<broker>
    ...
    <advanced>
        ...
        <locale>en_US</locale>
    </advanced>
    ...
</broker>

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.

Log Format

Currently the messages are logged as part of the default log4j configuration. The default broker log4j configuration will produce messages in this format.

No Format
2009-08-13 12:40:35,192 INFO [qpid.message] MESSAGE [Broker] BRK-1002 : Starting : Listening on TCP port 5672

The message is composed in the following way:

No Format
<date-time> INFO [qpid.message] MESSAGE <Actor> [<subject>] <MessageID> : <Message>

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:

No Format
MESSAGE <Actor> [<Subject>] <MessageID> : <Message>
Actor

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.

Broker

Actor format:

No Format
[Broker]

Used:
On broker startup and shutdown messages logged about the state of the broker will use the Broker actor.

Management

Actor format:

No Format
[mng:1(169.24.29.116)]

Used:
When an operation is performed via the JMX interfaces the connection Actor will provide details of the connection that performed the action.

Queue

Actor format:

No Format
[vh(/test)/qu(example.queue)]

Used:
This is used when the queue is processing the messages on the queue. Currently only SUB-1003 messages will be logged by this actor

Subscription

Actor format:

No Format
[sub:6(vh(test)/qu(example.queue))]

Used:
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

Channel/Connection

Actor format:

No Format
[con:1(/127.0.0.1:59556)]
[con:1(guest@/127.0.0.1:59556/test)]
[con:1(guest@/127.0.0.1:59556/test)/ch:1]

Used:
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.

Subject
Binding

Subject format:

No Format
[vh(/test)/ex(direct/<<default>>)/qu(testQueue)/rk(testQueue)]
Channel\Connection

Subject format:

No Format
[con:1(/127.0.0.1:59556)]
[con:1(guest@/127.0.0.1:59556/test)]
[con:1(guest@/127.0.0.1:59556/test)/ch:1]
Exchange

Subject format:

No Format
[vh(/test)/ex(direct/testName)]
MessageStore

Subject format:

No Format
[vh(/localhost)/ms(DerbyMessageStore)]
Queue

Subject format:

No Format
[vh(/test)/qu(testQueue)]
Subscription

Subject format:

No Format
[sub:0(qu(testQueue))]

Anchor
MessageList
MessageList

Message List

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]'.

Broker

No Format
BRK-1001 : Startup : Version: <Version> Build: <Build>
BRK-1002 : Starting : Listening on <Transport: TCP|TCP/SSL> port <Port>
BRK-1003 : Shuting down : <Transport: TCP|TCP/SSL> port <Port>
BRK-1004 : Ready
BRK-1005 : Stopped
BRK-1006 : Using configuration : <path>
BRK-1007 : Using logging configuration : <path>

JMX Management

No Format
MNG-1001 : Startup
MNG-1002 : Starting : <service> : Listening on port <Port>
MNG-1003 : Shuting down : <service> : port <Port>
MNG-1004 : Ready
MNG-1005 : Stopped
MNG-1006 : Using SSL Keystore : <path>
MNG-1007 : Open : User <username>
MNG-1008 : Close

VirtualHost

No Format
VHT-1001 : Created : <name>
VHT-1002 : Closed

DerbyMessageStore/MemoryMessageStore

No Format
MST-1001 : Created : <full classname>
MST-1002 : Store location : <path>
MST-1003 : Closed
MST-1004 : Recovery Start [: <queue.name>]
MST-1005 : Recovered <count> messages for queue <queue.name>
MST-1006 : Recovery Complete [: <queue.name>]

Connections

No Format
CON-1001 : Open : Client ID <id> : Protocol Version : <version>
CON-1002 : Close

AMQChannel

No Format
CHN-1001 : Create : Prefetch <count>
CHN-1002 : Flow <value: Started|Stopped>
CHN-1003 : Close
CHN-1004 : Prefetch Size (bytes) <bytes> : Count <message count>

Queue

No Format
QUE-1001 : Create : [AutoDelete] [Durable|Transient] [Priority:<levels>] Owner:<name>
QUE-1002 : Deleted

Exchange

No Format
EXH-1001 : Create : [Durable] Type:<value> Name:<value>
EXH-1002 : Deleted

Bindings

No Format
BND-1001 : Create [: Arguments : <key=value>]
BND-1002 : Deleted

Subscription

No Format
SUB-1001 : Create[ : Durable][ : Arguments : {0}]
SUB-1002 : Close
SUB-1003 : State : <state: ACTIVE|SUSPENDED>