Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Streamline Common Base Event logging

Reduce complexity and instrumentation code size

Paul Slauenwhite (paules@ca.ibm.com), Software Developer, IBM<reg></reg>
Paul Slauenwhite
Paul Slauenwhite is a Software Developer on the IBM Autonomic Computing Tools and Technologies project and contributes to the Eclipse Test and Performance Tool Platform (TPTP) open source project (formally Hyades). After receiving a B.Sc. degree in computer science from Dalhousie University, Paul joined IBM in 2000 and worked on the WebSphere Object Level Trace (OLT) project. In 2001, he joined the IBM WebSphere Studio Team, where he developed logging and tracing technologies. Paul moved to the Eclipse Hyades project at its inception in 2002, focusing on log and trace data, collection, and correlation. Paul is currently working on an M.Math degree in software engineering at the University of Waterloo.

Summary:  Common Base Event logging provides problem-determination data rich in activity and control-flow information that the Log and Trace Analyzer uses to accelerate problem determination and increase system serviceability and quality. This tutorial shows how to streamline Common Base Event logging instrumentation in the Java™ programming language to reduce complexity and instrumentation code size. You'll learn techniques and best practices that reduce maintenance requirements and let you increase customized, vendor-specific content.

Date:  03 Jan 2006
Level:  Intermediate PDF:  A4 and Letter (139 KB | 30 pages)Get Adobe® Reader®

Activity:  17141 views
Comments:  

Before you start

About this tutorial

The Log and Trace Analyzer (LTA) in the IBM Autonomic Computing Toolkit monitors, correlates, analyzes, diagnoses, and resolves run-time problems in complex heterogeneous systems. The LTA collects and consolidates practical problem-determination data in the Common Base Event format from disparate systems into a single management tool. You can then use the LTA for viewing, navigating, sorting, filtering, searching, correlating, and analyzing.

My previous tutorial, "Common Base Event Logging" (see Resources), showed how to configure Common Base Event logging in the Java language. This gives you a rich source of activity and control-flow information to accelerate problem determination and increase system serviceability and quality. The LTA can then use logged Common Base Events to detect and resolve configuration errors, performance degradation, exception states, resource starvation, security failures, communication delays, deadlocking, and other problems. However, a common criticism of Common Base Event logging is that it is too heavyweight for simple message logging, causing increased complexity, instrumentation code size, and maintenance. This tutorial shows how to streamline Common Base Event logging to mitigate these issues.

The tutorial:

  • Reviews the concept of problem determination and the Common Base Event model. The review details the benefits of and concerns with logging events and problems in the Common Base Event format.
  • Teaches best practices that let you streamline Common Base Event logging instrumentation in the Java programming language to reduce complexity and instrumentation code size.
  • Shows how to leverage the Common Base Event factory to create a customized XML configuration template for populating Common Base Events with static system-specific content.
  • Shows how to extend the Common Base Event factory to create a customized Event Factory Home for retrieving the same static system-specific content set as part of the Java Logging configuration (for example, java.util.Properties configuration file) and retrieved from Java Logging's Log Manager.
  • Shows how to create a customized Content Handler for populating Common Base Events with dynamically resolved run-time content.
  • Shows how to merge the Event Factory Home and Content Handler for streamlined Common Base Event logging based on the system's logging configuration file and run time to decrease maintenance and increase customized, vendor-specific content.

Developers can use the best practices and techniques in this tutorial when instrumenting their code for Common Base Event logging, but they are intended primarily for system serviceability architects. Serviceability architects provide a logging strategy for the complete system that individual developers follow when instrumenting Common Base Event logging in their components. System serviceability architects can use these best practices and techniques to craft a logging strategy to ensure consistent and useful problem-determination data to increase system serviceability and quality.

Note that the Common Base Event model is not associated with a particular consumer, such as a logging facility. This tutorial uses the Java Logging APIs because they provide an integrated and extensible logging facility for the Java language useful for illustrative purposes. However, numerous proprietary and open source logging facilities for the Java language are available. The tutorial is not intended to be an exhaustive aid in using this or any other logging facility.


Prerequisites

This tutorial is intended for serviceability architects and developers who want to streamline Common Base Event logging in new and existing systems written in the Java language. Basic knowledge of generic logging concepts and Common Base Events, and moderate experience with the Java language and Eclipse, will help you complete the tutorial's tasks and understand its examples.

This tutorial requires the Autonomic Computing Toolkit V3.0.0. The Autonomic Computing Toolkit V3.0.0 requires Eclipse V3.0.3. Eclipse V3.0.3 requires the Java Runtime Environment (JRE) V1.4.x (see Resources).

To run the code and configuration in this tutorial, you need the Common Base Event V1.0.1 Java implementation and support in the Log and Trace Analyzer V3.3.0, which is part of the Autonomic Computing Toolkit V3.0.0. Several plug-in Java Archive (JAR) files located in the <Autonomic Computing Toolkit installation directory>\eclipse\plugins directory are required for this tutorial (see Table 1).


Table 1. Plug-in JAR files required to run the code and configuration in this tutorial
JAR filePlug-in
hlcbe101.jarorg.eclipse.hyades.logging.core_3.3.0
hlcore.jarorg.eclipse.hyades.logging.core_3.3.0
ecore.jarorg.eclipse.emf.ecore_2.0.2\runtime
common.jarorg.eclipse.emf.common_2.0.1\runtime
hl14.jarorg.eclipse.hyades.logging.java14_3.3.0
hexr.jarorg.eclipse.hyades.execution.remote_3.3.0

See Resources or <Autonomic Computing Toolkit installation directory>\eclipse\plugins\org.eclipse.hyades.logging.core_3.3.0\doc.cbe101\index.html for a link to the Common Base Event V1.0.1 Java implementation API Javadoc documentation.


Sample code and configuration

This tutorial guides you through streamlining Common Base Event logging instrumentation using the Java Logging APIs. The sample code and configuration are provided for reference as an Eclipse Java project. The sample code (com.ibm.tutorial.TutorialClass) provides four distinct scenarios, ranging from standard to fully streamlined Common Base Event logging. These four scenarios illustrate the gradual reduction of complexity and of lines of instrumentation code that you can achieve by using the best practices and techniques you'll learn in this tutorial. To make the project available, follow these steps:

  1. Save the Tutorial_Java_Project.zip file to a local directory.
  2. Start the Autonomic Computing Toolkit.
  3. Open the Java Perspective by selecting Window > Open Perspective > Other... > Java > OK.
  4. Create a new Java project by selecting File > New > Project... > Java > Java Project > Next.
    1. Enter a project name, for example Tutorial.
    2. Select Finish.
  5. Import the Tutorial_Java_Project.zip file into the newly created Java project by selecting the project in the Package Explorer of the Java Perspective and selecting File > Import... > Zip file > Next.
    1. Select Browse... and navigate to the Tutorial_Java_Project.zip file saved in the local directory in Step 1.
    2. Select the Tutorial_Java_Project.zip file and select Open.
    3. Select Finish.
    4. Select Yes in the question dialog.

Figure 1 illustrates the resultant Java project in the Package Explorer of the Java Perspective.


Figure 1. Java project in the Package Explorer of the Java Perspective
Java project in the Package Explorer of the Java Perspective

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Tivoli
ArticleID=129773
TutorialTitle=Streamline Common Base Event logging
publish-date=01032006
author1-email=paules@ca.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.