Network Deployment (Distributed operating systems), v8.0 > Troubleshoot and support > Add logging and tracing to the application > Log Common Base Events in WAS > Log with Common Base Event API and the Java logging API


Create custom Common Base Event content handlers

Create a custom Common Base Event content handler or template to automate configuration or values for specific events. A content handler is an object that automatically sets the property values of each event based on any arbitrary policies that you want to use.

The following content handler classes were added to WAS to facilitate the use of the Common Base Event infrastructure:

Class Name Description
WsContentHandlerImpl This provides an implementation of org.eclipse.hyades.logging.events.cbe.ContentHandler specifically for use in the WAS environment. This content handler completes Common Base Events using information from the WAS runtime, and it uses the same content handler as is used internally by the WAS when completing Common Base Events for logging.
WsTemplateContentHandlerImpl This provides the same function as WsContentHandlerImpl, but it extends the org.eclipse.hyades.logging.events.cbe.impl.TemplateContentHandlerImpl class to enable the use of a Common Base Event template. Template content takes precedence in cases where the template data specifies values for the same Common Base Event fields as does the WsContentHandlerImpl.
In some situations, you might want some event property data set automatically for every event that you create. This automation is a way to fill in certain standard values that do not change, such as the application name, or to set some properties based on information that is available from the runtime environment, like creation time or thread information. We can set property data automatically by creating a content handler.


Procedure


Results

You now have a content handler or a custom content handler template based on the settings specified.


Related


Common Base Event content handler

+

Search Tips   |   Advanced Search