Configure applications to use Jakarta Commons Logging

 

+

Search Tips   |   Advanced Search

 

Overview

Jakarta Commons Logging and Common Base Events provide logging interfaces and wrappers.

WAS supports Jakarta Commons Logging by providing a logger. The support does not change interfaces defined by Jakarta Commons Logging.

The WAS logger is a thin wrapper for the WAS logging facility. The logger name is...

com.ibm.websphere.commons.logging.WsJDK14Logger

The logger can handle logging objects defined by either of the following:

A logging object is an object that holds logging entry information.

WAS provides the Jakarta Commons Logging binary distribution in its libraries directory. By default, the product uses the Jakarta Commons Logging LogFactory implementation and JDK14Logger.

The default configuration of Jakarta Commons Logging is stored in the commons-logging.properties file. To specify the factory class to use with Jakarta Commons Logging in an application, provide a file named...

org.apache.commons.logging.LogFactory

...located in...

META-INF/services

...that contains the name of the factory class on the first line. This is the configuration mechanism for the JAR file service provider, as defined in JDK 1.3 and above.bprac

For an application to use the WAS logger, the application must provide its own configuration for the logger. To configure an application to use the WAS logger, complete the steps that follow.

 

Procedure

  1. Examine Configurations for the WAS logger and determine which configuration best suits your application.

  2. Change your application configuration as needed to enable use of the WAS logger.

 

Results

After the application starts, Jakarta Commons Logging routes the application's logging output to the WAS logger.



Jakarta Commons Logging

Configurations for the WAS logger

 

Related tasks


Adding logging and tracing to your application

 

Related information


JSR 47: Logging API Specification
Jakarta Commons
Specification: Common Base Event
Standardize messages with the Common Base Event model
Logging/Containers And Classloaders