Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status Update

Following on from the high level design, this page will provide a more detailed design approach to implement status update logging in the Java broker.

The logging hierarchy identified in the high level design is not suitable to be directly used by Log4j as there is multiple routes and loops in the graph.

To better address this and to allow us to more eaily move between logging implementations an abstraction is recommended. This approach will allow the simplification of the logic around determining if logging should be performed in the main code base.
For example a Binding logging statement can be controlled via Exchange and Queue, each of which may be limited to s specific instance.

This design will cover the following areas:

  • Logging Abstraction
  • Logging Control
  • Logging Usage

Logging Abstraction

Logging Control

Logging Usage

Code Block
java
java
titleStatus Logging

pubic class Subscription
...
    if (_statusLogger.isInfoLogEnabled(this))
    {
        _statusLogger.info(this, "Subscription Event occured.");
    }
...

Would result in the following based on the Logging Format Design.

No Format

2009-06-29 13:35:10,1234 +0100 [ con:1(guest, 127.0.0.1, /)/ch:2/[sub:1(myqueue) ] Subscription Event occcured.
Code Block
java
java
titlePlugin Logging

pubic class Channel
...
    plugin = getACLPlugin();
...
    if (_statusLogger.isInfoLogEnabledForPlugin(plugin, this))
    {
        _statusLogger.pluginInfo(plugin, this, "Plugin Event occured for this.");
    }
...

Would result in the following based on the Logging Format Design.

No Format

2009-06-29 13:35:10,1234 +0100 [ con:1(guest, 127.0.0.1, /)/ch:2/pl(ACL, Consume, qu(myQueue)) ] Plugin Event occured for this.