DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Logging Format Design
This design follows on from the high level design work to provide a more detailed description of the format that all logged messages will take. The design is split in to two sections:
- LogSubjects Detail
- Log Formating
LogSubject Detail
Each LogSubject in the system has a format that for logging its own indentifier. It is invisaged that each Model instance will have a LogSubject member variable to act as a cache for their log format.
LogSubject Identifiers
The following is the basic LogSubject identifiers:
LogSubject |
Identifier |
|
|---|---|---|
Broker |
b |
|
MessageStore |
ms |
|
VirtualHost |
vh(<name>) |
|
Conection |
con:<uid>(<username>@<ip>/<vhost-name>) |
|
Channel |
ch:<uid> |
|
Queue |
qu(<queueName>) |
|
Exchange |
ex(<exchangeName>) |
|
Binding |
bd(<routingKey>) |
|
Subscription |
sub:<uid>:qu(<queueName>) |
|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0a2386db-51ba-469d-8709-c7d65de7da50"><ac:plain-text-body><![CDATA[ |
Plugin |
pl(name[, <optional values>]*)]]></ac:plain-text-body></ac:structured-macro> |
The plugin format allows for simple identification of the plugin such as 'ACL', 'Firewall' as well as giving the plugin the option to extend its base format. This extension is to allow easy processing of the log file.
LogSubject Paths
Broker, VirtualHost & Connection are root identifiers which means no parent nodes need be pre-appended to the log statement.
LogSubject |
Log Path |
Example |
||
|---|---|---|---|---|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="411a71a7-579f-4273-9beb-dde50b5d0da6"><ac:plain-text-body><![CDATA[ |
MessageStore |
vh(name)/ms |
[ vh(/)/ms ] |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="82fdf442-8e3a-41ed-98aa-3948accc2878"><ac:plain-text-body><![CDATA[ |
Channel |
<Connection>/ch:<uid> |
[ con:1(user@127.0.0.1/)/ch:1 ] |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d97701e9-1167-4f1d-abf1-6b3d9fc17049"><ac:plain-text-body><![CDATA[ |
Queue |
<Virtualhost>/qu(<queueName>) |
[ vh(/)/qu(testQueue) ] |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7374db7d-ccb3-4718-9abb-3f2bd598964c"><ac:plain-text-body><![CDATA[ |
Exchange |
<Virtualhost>/ex(<exchangeName>) |
[ vh(/)/ex(amq.direct) ] |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="62943fbc-e07f-4399-8ee1-eb929e4f6dbf"><ac:plain-text-body><![CDATA[ |
Binding |
<Virtualhost>/<Exchange>/<Queue>/bd(<routingKey>) |
[ vh(/)/ex(amq.direct)/qu(testQueue)/bd(testQueue) ] |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="46d63fbe-25fb-4598-8533-278dd345f252"><ac:plain-text-body><![CDATA[ |
Subscription |
sub:<uid>:qu(<queue-name>) |
[sub:2:qu(testQueue)] |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="cc976798-6d5b-4630-94a9-8d57e6b7ea2b"><ac:plain-text-body><![CDATA[ |
Plugin |
<Entity>/pl(name[, <optional values>]*) |
[pl(ACL, Consume, qu(testQueue))] |
]]></ac:plain-text-body></ac:structured-macro> |
The plugin entitiy allows for plugins to log additional details about their operation on an entity. For example as shown above an ACL plugin can log details about the attempt to consume from Queue 'testQueue'.
Log Formatting
To ensure that all log messages are displayed consistently the logging framework will provide the Datetime and Entity details, the requested log message will be added to the end this preamble:
<ISO-8601 Datetime (UTC based w/ TZ)> <Logging Level> [ <LogActor> ] [ <LogSubject> ] <LogMessage>
2009-06-29 13:35:10,1234 +0100 Message [con:1(user@127.0.0.1/)/ch:2] [sub:1:qu(myqueue)] Subscription Event Occcured