In Dynamo, log messages are treated as JavaBeans events. Each log message is encapsulated in an atg.nucleus.logging.LogEvent
object. Various types of messages are represented by subclasses of LogEvent
, such as ErrorLogEvent
and WarningLogEvent
. When a component wants to send a logging message, it creates a LogEvent
object of the appropriate class, containing the contents of the message. Those contents can include a String message, a Throwable, or both. The component then broadcasts that event object to all listeners.
You can easily create components that act as sources of LogEvents
by implementing the atg.nucleus.logging.ApplicationLogging
interface. Because GenericService
implements ApplicationLogging
and Nucleus components extend GenericService
, Nucleus components all follow the Dynamo logging conventions and can act as sources of error, warning, info and debug LogEvents
.