The logging model used by Oracle ATG Web Commerce 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 handles all requirements.
The key to designing logging systems is to model your logging rules in terms of the logging filters and sinks provided with Oracle ATG Web Commerce (or with new filters and sinks that you write yourself).
For example, if you want to monitor a particular component so errors are sent as email, but all messages, including errors, are sent to a single file, you need the following:
LogListenerQueue
, to ensure the component is not hampered by the logging processesDispatchLogger
that:receives events from the
LogListenerQueue
defines only the
logDestinations
propertydistributes all events to two listeners
Another
DispatchLogger
that feeds from the firstDispatchLogger
but only recognizesErrorLogEvents
EmailLogger
to receive events from the secondDispatchLogger
and to send those events as emailRotatingFileLogger
to receive all events from the firstDispatchLogger
and 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: