Chuck Rolke created DISPATCH-291:
------------------------------------

             Summary: Log messages should have formal ID numbers
                 Key: DISPATCH-291
                 URL: https://issues.apache.org/jira/browse/DISPATCH-291
             Project: Qpid Dispatch
          Issue Type: Improvement
    Affects Versions: 0.5
            Reporter: Chuck Rolke


Current log messages have no ID number or formal format declaration. This makes 
the system easy to use for code writers but is a disadvantage for customers 
using the system in the field.
* An external log management system or log scraping process has to rely on the 
log text to determine the message type. 
* To decompose the message there is some guessing about which fields are 
constant and which are variable. 
* Documenting the log message meaning is hard because the messages are 
sprinkled throughout the code and a doc writer can't find them.
* Impossible to internationalize.

The ActiveMQ-Artemis broker is an example of what Dispatch could use. It has a 
formal scheme for log messages with an ID number and message definition. Here's 
one:
{noformat}
   @LogMessage(level = Logger.Level.INFO)
   @Message(id = 221043, value = "Protocol module found: [{1}]. Adding protocol 
support for: {0}", format = Message.Format.MESSAGE_FORMAT)
   void addingProtocolSupport(String protocolKey, String moduleName);
{noformat}
In practice when this log message is emitted it appear as:
{noformat}
13:59:32,699 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: 
Protocol module found: [artemis-server]. Adding protocol support for: CORE
13:59:32,700 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: 
Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: 
AMQP
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to