In an Oracle Commerce Platform application, 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.
Components that implement interface atg.nucleus.logging.ApplicationLogging
can act as sources of LogEvents
. Because GenericService
implements ApplicationLogging
and Nucleus components extend GenericService
, Nucleus components all follow the Oracle Commerce Platform logging conventions and can act as sources of error, warning, info and debug LogEvents
.