WAS v8.5 > Troubleshoot > Add logging and tracing to the applicationLogging Common Base Events in WAS
WebSphere Application Server uses Common Base Events within its basic logging framework. Common Base Events can be created explicitly and then logged through the Java logging API, or can be created implicitly using the Java logging API directly. Logging Common Base Events is not supported with the HPEL log and trace mode.
An event is a notification from an application or the application server that reports information that is related to a specific problem or situation. Common Base Events provide you with a standard structure for these event notifications, which allow us to correlate events that are received from different applications. Log Common Base Events to capture events from different sources to help fix a problem within an application environment or to tune system performance.
For Common Base Event creation, the application server environment provides a Common Base Event factory with a content handler that provides both runtime data and template data for Common Base Events.
- Optional: Read about the Common Base Event types and how they are implemented within an application server. Refer to The Common Base Event in WAS.
- Read Logging Common Base Events in WAS.
- Configure the Common Base Event framework for the application server using one of the following methods:
- Logging with Common Base Event API and the Java logging API
- Generate Common Base Event content with the default event factory.
Results
Common Base Events will now be logged according to your configuration. Use these event logs to determine the source of application problems.
Subtopics
- The Common Base Event in WAS
The Common Base Event is an XML document that defines a common representation of events intended for use by enterprise management and business applications. The Common Base Event defines common fields, the values they can take, and the exact meanings of these values.- Logging with Common Base Event API and the Java logging API
In cases where the events that are generated by the Java logging API are insufficient to describe the event that needs capturing, we can create Common Base Events with the Common Base Event factory APIs.- java.util.logging -- Java logging programming interface
The java.util.logging.Logger class provides a variety of methods with which data can be logged.- Logger.properties file
Use the Logger.properties file to set logger attributes for the component.- Logging Common Base Events in WAS
The following practices ensure consistent use of Common Base Events within your components, and between your components and WAS components.- The Common Base Event in WAS
The Common Base Event is an XML document that defines a common representation of events intended for use by enterprise management and business applications. The Common Base Event defines common fields, the values they can take, and the exact meanings of these values.- Logging with Common Base Event API and the Java logging API
In cases where the events that are generated by the Java logging API are insufficient to describe the event that needs capturing, we can create Common Base Events with the Common Base Event factory APIs.- java.util.logging -- Java logging programming interface
The java.util.logging.Logger class provides a variety of methods with which data can be logged.- Logger.properties file
Use the Logger.properties file to set logger attributes for the component.- Logging Common Base Events in WAS
The following practices ensure consistent use of Common Base Events within your components, and between your components and WAS components.- Showlog commands for Common Base Events
The showlog command converts the service log from binary format into plain text.