Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added fixed logging message detail

...

This technical specification page will detail three four areas of work to complete the Status Update change:

  • The new classes required
  • How to provide fixed log messages
  • The additions to existing classes
  • The deletions from existing classes

...

Implementation of the Loggers

Each of these _MessageStatusLogger_s will be repsonsible for the correct formatting of the the Logging Entity detail according to the format design.

Class

Description

ConnectionMessageStatusLogger

Logger responsible for the Connection format.

ChannelMessageStatusLogger

Logger responsible for the Channel format.

QueueMessageStatusLogger

Logger responsible for the Queue format.

ExchangeMessageStatusLogger

Logger responsible for the Exchange format.

BindingMessageStatusLogger

Logger responsible for the Binding format.

SubscriptionMessageStatusLogger

Logger responsible for the subscription format.

MessageStoreMessageStatusLogger

Logger responsible for the MessageStore format.

RootMessageStatusLoggerImpl

Base logger that performs the final message formatting before logging.

MessageStatusLoggerFactoryImpl

Factory to create the above Loggers.

...

Class

Description

BrokerLogMessages

A static class that contains accessors to the various parametrised log messages.

How to provide fixed log messages

The design calls for providing a fixed method of accessing the messages. Such as the following

Code Block
java
java

String version="0.6";
int build=794277;
String message = BrokerLogMessages.BRK-1001(version, build);

The value of message above would be

No Format

BRK-1001 : Startup : Version: 0.6 Build: 794277

This can be done easily with the use of a MessageFormatter and a property file.

Code Block

BRK-1001 = Startup : Version {0} Build: {1}

Initially the BrokerLogMessages class could be hand coded but in a future iteration it could be generated based on the content of the property file.

Additions to existing classes

The following classes will have logging added to provide the required log messages specified in the Functional Specification. To be able to correctly log the Actor involved with the log statement a number of supporting classes will need to be modified so that the Actor can be passed through to the class listed here.

Main

No Format
BRK-1001 : Startup : Version: <Version> Build: <Build>
BRK-1004 : Ready
BRK-1007 : Using logging configuration : <path>

...