...
Interface | Description |
---|---|
LogActor | Actor that is requesting the log to be performedwill perform the logging. |
MessageStatusLogger | Entity that wishes to provide log statements. |
LogSubject | Subject of the logging . |
LogMessage MessageStatusLoggerFactory | Factory to generate MSLoggersLogMessages. |
RootMessageStatusLogger RootMessageLogger | Root logger that performs logging. |
RawMessageLogger | Wrapper for object that actually performs the logging. |
...
Implementation of the Actors
Class | Description |
---|---|
ConnectionActor AMQPActor | Responsible for providing data about the Connection when logging. |
ManagementConnectionActor ManagementActor | Responsible for providing data about the Management Connection when logging. |
Implementation of the
...
LogSubject
Each of these _MessageStatusLogger_s will be repsonsible for the correct formatting of the the Logging Entity detail LogSubjects will ensure they toString according to the format design.
Class | Description |
---|---|
ConnectionMessageStatusLogger ConnectionLogSubject | Logger responsible for the Connection format. |
ChannelMessageStatusLogger ChannelLogSubject | Logger responsible for the Channel format. |
QueueMessageStatusLogger QueueLogSubject | Logger responsible for the Queue format. |
ExchangeMessageStatusLogger ExchangeLogSubject | Logger responsible for the Exchange format. |
BindingMessageStatusLogger BindingLogSubject | Logger responsible for the Binding format. |
SubscriptionMessageStatusLogger SubscriptionLogSubject | Logger responsible for the subscription format. |
MessageStoreMessageStatusLogger MessageStoreLogSubject | Logger responsible for the MessageStore format. |
RootMessageStatusLoggerImpl RootMessageLoggerImpl | Base logger that performs the final message formatting before logging. |
MessageStatusLoggerFactoryImpl LogMessageFactoryImpl | Factory to create the above LoggersLogMessages. |
Logging
Class | Description |
---|---|
Log4jRawMessageLogger | Wrapper to use log4j as the output mechanism. |
TestRawMessageLogger | Wrapper that provides an inspectable log for testing. |
...
Class | Description |
---|---|
BrokerLogMessages | A static class that contains accessors to the various parametrised log messages. |
Psuedo-Code Example
Code Block | ||||
---|---|---|---|---|
| ||||
// logActor is retreived from the ThreadLocal // a logMessage of type logMessage (with parms) is then requested for the specified subject. logActor.logMessage(logSubject, LogMessage(parms)) ... instance of LogActor{ RootLogger logger = ...getRootLogger();L public void logMessage(LogSubject subject, LogMessage message) { if (logger.isMessageEnabled(this, subject) { // FormatMessage in to : // MESSAGE [ this.toString() ] [ subject.toString() ] <messageID> : <message value> logger.logMessage(FormatMessage(this, subject, message)); } } } |
How to provide fixed log messages
...
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> |
...
No Format |
---|
_logger.info("Binding queue:" + queue + " with routing key '" + routingKey + "' to exchange:" + this); _logger.debug("Loading configuration for virtualhost: " + config.getName()); |
Feedback
ID | From | Comment | Response |
---|---|---|---|
1 | Marnie | Ensure data logged in messaged due to be deleted is not lost. |
|
2 | Marnie | Following 1: Exception handling messages need further thought as replacing with 'Close' messages loses the cause |
|
3 | Marnie | Be mindful of performance in generating these log messages |
|
4 | Marnie | It is not clear that the LogActors, LogSubjects will be created and attached to their repective model objects |
|