Loggers About Log4j

3-4 Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server f. Specify message destination and configure filtering log messages by severity level or other criteria. See Filter log messages in the Oracle WebLogic Server Administration Console Help. See also Section 3.6.1, Specifying Severity Level for Loggers. 2. Alternatively, configure log message filtering on the message handler using the WebLogic Scripting Tool. See Configuring Existing Domains in Oracle WebLogic Scripting Tool. 3. Filter log messages published by the logger using the Java APIs. See Section 4.2, Filtering Messages by Severity Level or Other Criteria.

3.4 Log4j and the Commons Logging API

Application developers who want to use the WebLogic Server message catalogs and logging services as a way for their applications to produce log messages must know XML and the Java APIs. Many developers and system administrators use Log4j, which is a predecessor to the Java Logging APIs. Log4j is an open source tool developed for putting log statements in your application. The Log4j Java logging facility was developed by the Jakarta Project of the Apache Foundation. You can learn more about Log4j at The Log4j Project at http:logging.apache.orglog4jdocs . WebLogic Server supports Log4j as a configuration option for WebLogic logging services. See Section 3.5, How to Use Log4j with WebLogic Logging Services. The Jakarta Commons Logging APIs provide an abstraction layer that insulates users from the underlying logging implementation, which can be Log4j or Java Logging APIs. WebLogic Server provides an implementation of the Commons LogFactory interface, letting you issue requests to the server Logger using this API. See Section 3.6, How to Use the Commons API with WebLogic Logging Services.

3.4.1 About Log4j

Log4j has three main components: loggers, appenders, and layouts. The following sections provide a brief introduction to Log4j.

3.4.1.1 Loggers

Log4j defines a Logger class. An application can create multiple loggers, each with a unique name. In a typical usage of Log4j, an application creates a Logger instance for each application class that will emit log messages. Loggers exist in a namespace hierarchy and inherit behavior from their ancestors in the hierarchy. You can set the Severity level for each Logger at any level in the hierarchy. See Section 3.6.1, Specifying Severity Level for Loggers.

3.4.1.2 Appenders