In keeping with the JavaBeans specifications, objects that receive logging messages must implement the LogListener interface. This also means that the log source must have addLogListener and removeLogListener methods.

Dynamo comes with a set of LogListener implementations that write log messages to files, the console, and so on. See LogEvent Sinks and the components in /atg/dynamo/service/logging. There are also listeners that can dispatch a log message to one of several destinations, so error events are written to one file, warning events are written to another file, and so on. See DispatchLogger. Another important listener is one that can queue log events from various components before sending them to their final destinations. This means that a component sending a log event is not held up waiting for the event to be written to disk. Instead, the event is sent to the queue, which later passes the event on to the listener that eventually writes it to the file. See LogListenerQueue.

One of the important characteristics of Dynamo logging is that a log source does not need to know where its log messages are going, whether they are being queued, and so on. Because the listeners can be defined in properties files, all decisions about logging can be left to configuration, while the log source only must worry about generating and broadcasting logging messages.

 
loading table of contents...