WAS v8.5 > Reference > Troubleshooting tips

Logging Common Base Events in WAS

The following practices ensure consistent use of Common Base Events within your components, and between your components and WebSphere Application Server components.

Follow these guidelines:

The following sample Logger.properties file entry demonstrates how to associate the com.ibm.componentX logger with the com.ibm.componentX event factory:

The following sample code demonstrates the use of the same event factory setting for direct (Part 1) and indirect (Part 2) Common Base Event logging:

<?xml version="1.0" encoding="UTF-8"?> 
<TemplateEvent> 
  version="1.0.1" 
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
  xsi:noNamespaceSchemaLocation="templateEvent.xsd"> 
 <CommonBaseEvent> 
   <sourceComponentId application="My application" component="com.ibm.componentX"/>    <extendedDataElements CommonBaseEventname="Sample ExtendedDataElement name" type="string">    <values>Sample ExtendedDataElement value</values>   </extendedDataElements>  < /CommonBaseEvent> 
< /TemplateEvent>


Related


Logging with Common Base Event API and the Java logging API
Logging Common Base Events in WAS
Add logging and tracing to the application


+

Search Tips   |   Advanced Search