The logging model used by Dynamo provides a flexible mechanism for setting up complex application logging rules. With a combination of filters and sinks, you can design a logging configuration that will handle all of your requirements.
The key to designing logging systems is to model your logging rules in terms of the logging filters and sinks provided with Dynamo (or with new filters and sinks that you write yourself).
For example, if you want to monitor a particular component so that errors are sent as e-mail, but all messages, including errors, are sent to a single file, then you’ll need the following:
a
LogListenerQueue, to make sure that the component isn’t hampered by the logging processesa
DispatchLoggerthat:receives events from the
LogListenerQueuedefines only the
logDestinationspropertydistributes all events to two listeners
another
DispatchLoggerthat feeds from the firstDispatchLoggerbut only recognizesErrorLogEventsan
EmailLoggerto receive events from the secondDispatchLoggerand to send those events as e-maila
RotatingFileLoggerto receive all events from the firstDispatchLoggerand write those events to a file
Finally, the log source component must specify the LogListenerQueue as one of its logListeners.
Here is an example of what a logging system might look like:


