Operational Logging - Status Update - Technical SpecificationPage edited by Martin RitchieUpdate based on feedback, applied to Design WRT roles/responsibilitiesTechnical Specification
OverviewThis technical specification page will detail four areas of work to complete the Status Update change:
New classesThe new classes required draws on the design work already completed. The abstraction layer will be the new code created as part of this work. This can be split in to Interfaces and Classes. Interface listThese interfaces form the abstraction layer.
Class ListImplementation of the Actors
Implementation of the LogSubjectEach of these LogSubjects will ensure they toString according to the format design.
Logging
Log Messages
Psuedo-Code Example
// 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 messagesThe design calls for providing a fixed method of accessing the messages. Such as the following
String version="0.6";
int build=794277;
String message = BrokerLogMessages.BRK-1001(version, build);
The value of message above would be BRK-1001 : Startup : Version: 0.6 Build: 794277 This can be done easily with the use of a MessageFormatter and a property file.
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 classesThe following classes will have logging added to provide the required log messages specified in the Functional Specification. MainBRK-1001 : Startup : Version: <Version> Build: <Build> BRK-1004 : Ready BRK-1007 : Using logging configuration : <path> ApplicationRegistryBRK-1002 : Starting : Listening on <Transport> port <Port> BRK-1003 : Shuting down : <Transport> port <Port> BRK-1005 : Stopped ConfigurationFileApplicationRegistryBRK-1006 : Using configuration : <path> JMXManagedObjectRegistryMNG-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> VirtualHostVHT-1001 : Created : <name> VHT-1002 : Closed DerbyMessageStore/MemoryMessageStoreMST-1001 : Created : <name> MST-1003 : Closed DerbyMessageStoreMST-1002 : Store location : <path> MST-1004 : Recovery Start [: <queue.name>] MST-1005 : Recovered <count> messages for queue <queue.name> MST-1006 : Recovery Complete [: <queue.name>] AMQMinaProtocolSessionCON-1001 : Open : Client ID <id> : Protocol Version : <version> CON-1002 : Close AMQChannelCHN-1001 : Create : Prefetch <count> CHN-1002 : Flow <value> CHN-1003 : Close QueueRegistryQUE-1001 : Create : [AutoDelete] [Durable|Transient] [Priority:<levels>] Owner:<name> QUE-1002 : Deleted AbstractExchangeEXH-1001 : Create : [Durable] Type:<value> Name:<value> EXH-1002 : Deleted ExchangeBindingsBND-1001 : Create [: Arguments : <key=value>] BND-1002 : Deleted SubscriptionImplSUB-1001 : Create : [Durable] [Arguments : <key=value>] SUB-1002 : Close Deletions from existing classesThe following log statements should be removed from the broker packages as they are being replaced with a new message. AMQMinaProtocolSession_logger.info("Channel[" + channelId + "] awaiting closure - processing close-ok"); _logger.info("Closing channel due to: " + e.getMessage()); _logger.info("Closing connection due to: " + e.getMessage()); _logger.info("Closing connection due to: " + e.getMessage()); _logger.debug("REALLY Closing protocol session:" + _minaProtocolSession); AMQPFastProtocolHandler_logger.info("Protocol session created for:" + protocolSession.getRemoteAddress()); _logger.info("Session opened for:" + protocolSession.getRemoteAddress()); _logger.info("Protocol Session closed for:" + protocolSession.getRemoteAddress()); _logger.debug("AMQPFastProtocolHandler created"); BasicConsumeMethodHandler_logger.debug("BasicConsume: from '" + body.getQueue() + _logger.debug("No queue for '" + body.getQueue() + "'"); _logger.debug("Closing connection due to invalid selector"); ChannelFlowHandler.java:_logger.debug("Channel.Flow for channel " + channelId + ", active=" + body.getActive()); Configuration_devlog.info("Configuring logger using configuration file " + logConfigFile.getAbsolutePath()); _devlog.info("log file " + logConfigFile.getAbsolutePath() + " will be checked for changes every _devlog.debug("Using configuration file " + _configFile.getAbsolutePath()); ex.getMessage()); ConnectionCloseMethodHandler_logger.info("ConnectionClose received with reply code/reply text " + body.getReplyText() + " for " + session); DerbyMessageStore_logger.info("Configuring Derby message store for virtual host " + virtualHost.getName()); _logger.info("Recovering persistent state..."); _logger.info("Persistent state recovered successfully"); _logger.info("Recovering durable exchange " + exchange.getName() + " of type " + exchange.getType() + "..."); _logger.info("Restoring binding: (Exchange: " + exchange.getName() + ", Queue: " + queueName _logger.info("Recovered message counts: " + queueRecoveries); _logger.debug("public void createQueue(AMQQueue queue = " + queue + "): called"); _logger.debug("public void removeQueue(AMQShortString name = " + name + "): called"); _logger.debug("On recovery, delivering " + message.getMessageId() + " to " + queue.getName()); HeadersExchange_logger.debug("Exchange " + getName() + ": Unbinding " + queue.getName()); _logger.debug("Exchange " + getName() + ": routing message with headers " + headers); JMXManagedObjectRegistrylog.info("Initialising managed object registry using platform MBean server"); _log.info("JMX ConnectorServer using SSL keystore file " + ksf.getAbsolutePath()); _startupLog.info("JMX ConnectorServer using SSL keystore file " + ksf.getAbsolutePath()); Main_brokerLogger.info("Starting Qpid Broker " + QpidProperties.getReleaseVersion() _brokerLogger.info("Qpid.AMQP listening on non-SSL address " + bindAddress); _brokerLogger.info("Qpid.AMQP listening on SSL port " + config.getSSLPort()); _brokerLogger.info("Qpid Broker Ready :" + QpidProperties.getReleaseVersion() MemoryMessageStore_log.info("Using capacity " + DEFAULT_HASHTABLE_CAPACITY + " for hash tables"); _log.info("Using capacity " + hashtableCapacity + " for hash tables"); QueueBindHandler_log.info("Binding queue " + queue + " to exchange " + exch + " with routing key " + routingKey); QueueDeclareHandler_logger.info("Queue " + queueName + " bound to default exchange(" + defaultExchange.getName() + ")"); _logger.info("Queue " + queueName + " declared successfully"); QueueUnbindHandler_log.info("Binding queue " + queue + " to exchange " + exch + " with routing key " + routingKey); SimpleAMQQueue_logger.info("Auto-deleteing queue:" + this); SubscriptionImpl_logger.info("Closing subscription (" + debugIdentity() + "):" + this); VirtualHost_logger.info("Binding queue:" + queue + " with routing key '" + routingKey + "' to exchange:" + this); _logger.debug("Loading configuration for virtualhost: " + config.getName());
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Qpid > Operational Logging - Status Update - T... confluence
- [CONF] Apache Qpid > Operational Logging - Status Updat... confluence
- [CONF] Apache Qpid > Operational Logging - Status Updat... confluence
- [CONF] Apache Qpid > Operational Logging - Status Updat... confluence
- [CONF] Apache Qpid > Operational Logging - Status Updat... confluence
- [CONF] Apache Qpid > Operational Logging - Status Updat... confluence
- [CONF] Apache Qpid > Operational Logging - Status Updat... confluence