Skip navigation.

Configuring Log Files and Filtering Log Messages

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

Introduction and Roadmap

This section describes the contents and organization of this guide—Configuring Log Files and Filtering Log Messages.


Document Scope and Audience

This document describes how you use BEA WebLogic Server® logging services to monitor server, subsystem, and application events. It explains how you configure WebLogic Server to write messages to log files and listen for the log messages that WebLogic Server broadcasts, and describes how to view log messages through the WebLogic Server Administration Console.

This document is a resource for system administrators who configure WebLogic logging services and monitor server and subsystem events, and for J2EE application developers who want to integrate their application logs with WebLogic Server logs. This document is relevant to all phases of a software project, from development through test and production phases.

This document does not address application logging or localization and internationalization of log message catalogs. For links to information on these topics, see Related Documentation.

It is assumed that the reader is familiar with J2EE and Web technologies, object-oriented programming techniques, and the Java programming language.


Guide to This Document

The document is organized as follows:


Related Documentation

The BEA corporate Web site provides all documentation for WebLogic Server. Specifically, "View and Configure Logs" in the Administration Console Online Help describes how to view and configure log files that a WebLogic Server instance generates, and Using WebLogic Logging Services for Application Logging describes how you can use WebLogic Server message catalogs, non-catalog logging, and servlet logging to produce log messages from your application or a remote Java client, and describes WebLogic's support for internationalization and localization of log messages.


Logging Samples and Tutorials

In addition to this document, BEA Systems provides a variety of logging code samples and tutorials that show logging configuration and API use.

Avitek Medical Records Application (MedRec) and Tutorials

MedRec is an end-to-end sample J2EE application shipped with WebLogic Server that simulates an independent, centralized medical record management system. The MedRec application provides a framework for patients, doctors, and administrators to manage patient data using a variety of different clients.

MedRec demonstrates WebLogic Server and J2EE features, and highlights BEA-recommended best practices. MedRec is included in the WebLogic Server distribution, and can be accessed from the Start menu on Windows machines. For Linux and other platforms, you can start MedRec from the WL_HOME\samples\domains\medrec directory, where WL_HOME is the top-level installation directory for WebLogic Server.

Log4j Integration in MedRec

The MedRec domain installed with WebLogic Server is configured to enable Log4j logging. Several action classes and MedRec utility classes use the weblogic.logging.log4j.Log4jLoggingHelper class to create a new logger, access a Log4j Appender, and register the Appender with the logger. Classes extending the base classes then use the logger to write informational messages to the WebLogic Server log file.

Logging Examples in the WebLogic Server Distribution

WebLogic Server 9.0 optionally installs API code examples in WL_HOME\samples\server\examples\src\examples, where WL_HOME is the top-level directory of your WebLogic Server installation. You can start the examples server, and obtain information about the samples and how to run them from the WebLogic Server 9.0 Start menu.


New and Changed Logging Features in This Release

WebLogic logging services provide the following new features and configuration options:

Logging Volume Control

Enhancements to LogMBean interfaces let you control logging output by setting threshold severity levels and filters on both loggers and handlers.

In earlier versions of WebLogic Server, system administrators and developers had only programmatic access to loggers and handlers. In this release, you can configure handlers by using MBeans, eliminating the need to write code for most basic logging configurations. The Administration Console and WebLogic Scripting Tool (WLST) provide an interface for interacting with logging MBeans. Loggers are configured only through the API.

Support for Log4J

WebLogic Server supports Jakarta Project Log4j. In the Administration Console, you specify Log4j or the default Java Logging implementation. Alternatively, you can configure Log4j logging through the LogMBean interface using the LogMBean.isLog4jLoggingEnabled attribute.

Support for Commons API

The Jakarta Commons Logging APIs provide an abstraction layer that insulates users from the underlying logging implementation. WebLogic Server provides an implementation of the Commons LogFactory interface, letting you issue requests to the server Logger using this API.

New Log File Directories and Locations

Log Content Enhancements

All log messages include:

Changes in Logging MBeans

Within a WebLogic Server domain, several MBeans configure logging services. The logging subsystem has several new or updated MBeans. Table 1-1 introduces the MBeans and Figure 1-1 illustrates the MBeans in a domain.

Table 1-1 MBeans for Domain and Server Logging

This MBean...



  • Threshold severity level and filter settings for logging output.

  • Whether the server logging is based on a Log4j implementation or the default Java Logging APIs.

  • Whether to redirect the JVM stdout and stderr output to the registered log destinations.

The Administration Server maintains an instance of LogMBean for the domain-wide message log, and each server instance maintains its own instance for its local server log. See LogMBean in the WebLogic Server MBean Reference.


Defines the base interface for common configuration across different types of logs: Server, Domain, HTTP Access, and JMS logs.

Provides a consistent set of base features for the different logs created within the server, such as log file names and the location, file-rotation criteria, and number of files that a WebLogic Server instance uses to store log messages.

See LogFileMBean in the WebLogic Server MBean Reference.


A log filter which determines which messages a server instance sends to the registered log destinations. Each log filter is represented by its own instance of LogFilterMBean.

A log filter can be defined at the domain or server level. See LogFilterMBean in the WebLogic Server MBean Reference.


Path prefix for the server's JTA transaction log files. See ServerMBean in the WebLogic Server MBean Reference.


Logging HTTP requests. See WebServerMBean in the WebLogic Server MBean Reference.


Logging HTTP requests for virtual hosts that you define. See VirtualHostMBean in the WebLogic Server MBean Reference.


Message log file for this JMS Server. See JMSServerMBean in the WebLogic Server MBean Reference.

Figure 1-1 Logging MBeans

Logging MBeans



For a complete listing, see the WebLogic Server MBean Reference, which lists all deprecated and new MBeans for 9.0.


Skip navigation bar  Back to Top Previous Next