Logging Common Base Events in WebSphere Application Server
WAS 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 High Performance Extensible Logging (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 you 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 WebSphere Application Server.
- Read Logging Common Base Events in WebSphere Application Server.
- 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 the configuration. Use these event logs to determine the source of application problems.
Subtopics
- The Common Base Event in WebSphere Application Server
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 WebSphere Application Server
The following practices ensure consistent use of Common Base Events within the components, and between the components and WebSphere Application Server components.
- Showlog commands for Common Base Events
The showlog command converts the service log from binary format into plain text.