Versions Compared

Key

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

...

High Level Design

The Broker and Virtualhost objects will become objects that are responsible for the production of logs.  By this we mean:

  • the production of a log file to disk or logging to a stream
  • the collection of recent logs for viewing via management

Both Broker and Virtualhost have have LogFilter children.  These define the what logging statements will appear in the log.

Proposed Configure Object Model

Gliffy Diagram
nameConfigModelShowingProposedLoggingObjects

Broker and Virtualhost changes

 

LogFilter

Associates a logger with a logging level.

When considering whether a logging event should be written, the implementation will check for a LogFilter with a matching logger, if it exists the level of the log event is compared against the level of the filter.  If the level of the event is higher or equal to that of the level filter, the logging event will be written.  If there is no matching log filter, the implementation will check for a filter for the logger's parent and then make the same determination.  If this fails to find a filter, this will continue until the root it reached.  If this occurs, the determination will be made against the level associated with the Broker or Virtualhost itself.

Adding (or removing) a LogLevel will have an immediate effect on what appears in the logs. If the LogLevel is durable, as is common with all configured objects, the object will be stored in the configuration store, so it will be effective on restart.

 

Gliffy Diagram
nameLogLevel

 

 

LogRecorders

The types of LogRecorder will be:

FileLogRecorder

A type that logs to a file on disk supporting rolling (time or sized based) and compression.  It should also accept a umask allowing the file permissions of logs to be controlled (in POSIX environments).

StreamRecorder

Sends a log file to standard out or standard error.  Maybe a boolean option flush?

BoundedBufferRecorder

Logs to a bounded buffer.  

Might be useful to define other recorder types to support testing.

LogFilters

Need LogFilters to have the ability to express that certain loggers should be logger at a certain level e.g. o.a.qpid at level DEBUG.  Also need a way to express whether a virtual hosts messages should be included or not?