PK \Eoa,mimetypeapplication/epub+zipPK\EiTunesMetadata.plistt artistName Oracle Corporation book-info cover-image-hash 987753645 cover-image-path OEBPS/dcommon/oracle-logo.jpg package-file-hash 380156017 publisher-unique-id E13739-05 unique-id 191014289 genre Oracle Documentation itemName Oracle® Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server, 11g Release 1 (10.3.6) releaseDate 2011-11-03T12:04:18Z year 2011 PKfKgPK\EMETA-INF/container.xml PKYuPK\EOEBPS/logging_services.htm Understanding WebLogic Logging Services

2 Understanding WebLogic Logging Services

WebLogic logging services provide facilities for writing, viewing, filtering, and listening for log messages. These log messages are generated by WebLogic Server instances, subsystems, and Java EE applications that run on WebLogic Server or in client JVMs.

The following sections describe the WebLogic logging services environment, logging process, and log files:

What You Can Do With WebLogic Logging Services

WebLogic Server subsystems use logging services to provide information about events such as the deployment of new applications or the failure of one or more subsystems. A server instance uses them to communicate its status and respond to specific events. For example, you can use WebLogic logging services to report error conditions or listen for log messages from a specific subsystem.

Each WebLogic Server instance maintains a server log. Because each WebLogic Server domain can run concurrent, multiple instances of WebLogic Server, the logging services collect messages that are generated on multiple server instances into a single, domain-wide message log. The domain log provides the overall status of the domain. See Server Log Files and Domain Log Files.

How WebLogic Logging Services Work

The following sections describe the logging environment and provide an overview of the logging process.

Components and Environment

There are two basic components in any logging system: a component that produces log messages and another component to distribute (publish) messages. WebLogic Server subsystems use a message catalog feature to produce messages and the Java Logging APIs to distribute them, by default. Developers can also use message catalogs for applications they develop.

The message catalog framework provides a set of utilities and APIs that your application can use to send its own set of messages to the WebLogic server log. The framework is ideal for applications that need to localize the language in their log messages, but even for those applications that do not need to localize, it provides a rich, flexible set of tools for communicating status and output.

See "Using Message Catalogs with WebLogic Server" in Using Logging Services for Application Logging for Oracle WebLogic Server.

In addition to using the message catalog framework, your application can use the following mechanisms to send messages to the WebLogic server log:

  • weblogic.logging.NonCatalogLogger APIs

    With NonCatalogLogger, instead of calling messages from a catalog, you place the message text directly in your application code. See "Using the NonCatalogLogger APIs" in Using Logging Services for Application Logging for Oracle WebLogic Server.

  • Server Logging Bridge

    WebLogic Server provides a mechanism by which your logging application can have its messages redirected to WebLogic logging services without the need to make code changes or implement any of the propriety WebLogic Logging APIs. See Server Logging Bridge.

Use of either the NonCatalogLogger APIs or Server Logging Bridge is suitable for logging messages that do not need to be internationalized or that are internationalized outside the WebLogic I18n framework.

To distribute messages, WebLogic Server supports Java based logging by default. The LoggingHelper class provides access to the java.util.logging.Logger object used for server logging. This lets developers take advantage of the Java Logging APIs to add custom handlers, filters, and formatters. See the java.util.logging API documentation at http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html.

Alternatively, you can configure WebLogic Server to use the Jakarta Project Log4j APIs to distribute log messages. See Log4j and the Commons Logging API.

Terminology

Logger - A Logger object logs messages for a specific subsystem or application component. WebLogic logging services use a single instance of java.util.logging.Logger for logging messages from the Message Catalogs, NonCatalogLogger, and the Debugging system.

Handler - A class that extends java.util.logging.Handler and receives log requests sent to a logger. Each Logger instance can be associated with a number of handlers to which it dispatches log messages. A handler attaches to a specific type of a log message; for example, the File Handler for the server log file.

Appender - An appender is Log4j terminology for a handler, in this case, an instance of a class that implements org.apache.log4j.Appender and is registered with an org.apache.log4j.Logger to receive log events.

Overview of the Logging Process

WebLogic Server subsystems or application code send log requests to Logger objects. These Logger objects allocate LogRecord objects which are passed to Handler objects for publication. Both loggers and handlers use severity levels and (optionally) filters to determine if they are interested in a particular LogRecord object. When it is necessary to publish a LogRecord object externally, a handler can (optionally) use a formatter to localize and format the log message before publishing it to an I/O stream.

Figure 2-1 shows the WebLogic Server logging process: WebLogic Catalog APIs or Commons Logging APIs are used for producing messages; Java Logging (default) and Log4j are options for distributing messages.

Figure 2-1 WebLogic Server Logging Process

Description of Figure 2-1 follows

Figure 2-1 illustrates the following process:

  1. The client, in this case, a WebLogic Server subsystem or Java EE application, invokes a method on one of the generated Catalog Loggers or the Commons Logging implementation for WebLogic Server.

    1. When WebLogic Server message catalogs and the NonCatalogLogger generate messages, they distribute their messages to the server Logger object.

    2. The Jakarta Commons Logging APIs define a factory API to get a Logger reference which dispatches log requests to the server Logger object.

      The server Logger object can be an instance of java.util.logging.Logger or org.apache.log4j.Logger.

  2. The server Logger object publishes the messages to any message handler that has subscribed to the Logger.

    For example, the Stdout Handler prints a formatted message to standard out and the File Handler writes formatted output to the server log file. The Domain Log Broadcaster sends log messages to the domain log, which resides on the Administration Server, and the JMX Log Broadcaster sends log messages to JMX listeners on remote clients.

Best Practices: Integrating Java Logging or Log4j with WebLogic Logging Services

Consider the following recommendations for using WebLogic logging services with Java Logging or Log4j:

  • Use the Catalog and NonCatalog loggers or the Commons API for producing log messages for publishing by WebLogic logging services.

  • Use a Java Logging or Log4j Logger reference for adding custom handlers, appenders, or filters to WebLogic logging services for publishing messages.

  • If your application is configured for Java Logging or Log4j, in order to publish application events using WebLogic logging services, you can do either of the following:

    • (Recommended) Configure your application's logger to use the Server Logging Bridge, which provides a lightweight means for your application's log messages to be redirected to WebLogic logging services without requiring any code changes. For more information, see Server Logging Bridge.

    • Create a custom handler or appender that relays the application events to WebLogic logging services using programmatic API. For information, see How to Use Log4j with WebLogic Logging Services.

Server Log Files and Domain Log Files

Each WebLogic Server instance writes all messages from its subsystems and applications to a server log file that is located on the local host computer. By default, the server log file is located in the logs directory below the server instance root directory; for example, DOMAIN_NAME\servers\SERVER_NAME\logs\SERVER_NAME.log, where DOMAIN_NAME is the name of the directory in which you located the domain and SERVER_NAME is the name of the server.

In addition to writing messages to the server log file, each server instance forwards a subset of its messages to a domain-wide log file. By default, servers forward only messages of severity level NOTICE or higher. While you can modify the set of messages that are forwarded, servers can never forward messages of the DEBUG severity level. See "Forward messages to the domain log" in the Oracle WebLogic Server Administration Console Help.

The domain log file provides a central location from which to view the overall status of the domain. The domain log resides in the Administration Server logs directory. The default name and location for the domain log file is DOMAIN_NAME\servers\ADMIN_SERVER_NAME\logs\DOMAIN_NAME.log, where DOMAIN_NAME is the name of the directory in which you located the domain and ADMIN_SERVER_NAME is the name of the Administration Server. See "Change domain log file name and location" in the Oracle WebLogic Server Administration Console Help.

The timestamp for a record in the domain log is the timestamp of the server where the message originated. Log records in the domain log are not written in the order of their timestamps; the messages are written as soon as they arrive. It may happen that a Managed Server remains out of contact with the Administration Server for some period of time. In that case, the messages are buffered locally and sent to the Administration Server once the servers are reconnected.

How a Server Instance Forwards Messages to the Domain Log

To forward messages to the domain log, each server instance broadcasts its log messages. A server broadcasts all messages and message text except for messages of the DEBUG severity level.

The Administration Server listens for a subset of these messages and writes them to the domain log file. To listen for these messages, the Administration Server registers a listener with each Managed Server. By default, the listener includes a filter that allows only messages of severity level NOTICE and higher to be forwarded to the Administration Server. (See Figure 2-2.)

Figure 2-2 WebLogic Server and Domain Logs

Description of Figure 2-2 follows

For any given WebLogic Server instance, you can override the default filter and create a log filter that causes a different set of messages to be written to the domain log file. For information on setting up a log filter for a WebLogic Server instance, see "Create log filters" in the Oracle WebLogic Server Administration Console Help.

If the Administration Server is unavailable, Managed Servers continue to write messages to their local server log files. However, by default, when the servers are reconnected, not all the messages written during the disconnected period are forwarded to the domain log file. A Managed Server keeps a specified number of messages in a buffer so they can be forwarded to the Administration Server when the servers are reconnected.

The number of messages kept in the buffer is configured by the LogMBean attribute DomainLogBroadcasterBufferSize. DomainLogBroadcasterBufferSize controls the frequency with which log messages are sent from the managed server to the domain server. With the development default of 1, there is not batching of log messages; only the last logged message is forwarded to the Administration Server domain log. For example, if the Administration Server is unavailable for two hours and then is restored, the domain log will not contain any messages that were generated during the two hours. See "MSI Mode and the Domain Log File" in Managing Server Startup and Shutdown for Oracle WebLogic Server. In production mode, the default buffer size on the managed server is 10. When the buffer reaches its capacity, the messages in the buffer are flushed by sending them to the domain log on the administration server. For performance reasons, it is recommended that you set this value to 10 or higher in production. A higher value will cause the buffer to be broadcast to the domain log less frequently.

If you have configured a value greater than 1, that number of messages will be forwarded to the domain log when the Managed Server is reconnected to the Administration Server.


Note:

This can result in a domain log file that lists messages with earlier timestamps after messages with later timestamps. When messages from the buffer of a previously disconnected Managed Server are flushed to the Administration Server, those messages are simply appended to the domain log, even though they were generated before the previous messages in the domain log.

Server and Subsystem Logs

Each subsystem within WebLogic Server generates log messages to communicate its status. For example, when you start a WebLogic Server instance, the Security subsystem writes a message to report its initialization status. To keep a record of the messages that its subsystems generate, WebLogic Server writes the messages to log files.

Server Log

The server log records information about events such as the startup and shutdown of servers, the deployment of new applications, or the failure of one or more subsystems. The messages include information about the time and date of the event as well as the ID of the user who initiated the event.

You can view and sort these server log messages to detect problems, track down the source of a fault, and track system performance. You can also create client applications that listen for these messages and respond automatically. For example, you can create an application that listens for messages indicating a failed subsystem and sends E-mail to a system administrator.

The server log file is located on the computer that hosts the server instance. Each server instance has its own server log file. By default, the server log file is located in the logs directory below the server instance root directory; for example, DOMAIN_NAME\servers\SERVER_NAME\logs\SERVER_NAME.log, where DOMAIN_NAME is the name of the directory in which you located the domain and SERVER_NAME is the name of the server. See "Change server log file name and location" in the Oracle WebLogic Server Administration Console Help.

To view messages in the server log file, you can log on to the WebLogic Server host computer and use a standard text editor, or you can log on to any computer and use the log file viewer in the Administration Console. See "View server logs" in the Oracle WebLogic Server Administration Console Help.


Note:

Oracle recommends that you do not modify log files by editing them manually. Modifying a file changes the timestamp and can confuse log file rotation. In addition, editing a file might lock it and prevent updates from WebLogic Server, as well as interfere with the Accessor.

For information about the Diagnostic Accessor Service, see "Accessing Diagnostic Data With the Data Accessor" in Configuring and Using the Diagnostics Framework for Oracle WebLogic Server.


In addition to writing messages to a log file, each server instance prints a subset of its messages to standard out. Usually, standard out is the shell (command prompt) in which you are running the server instance. However, some operating systems enable you to redirect standard out to some other location. By default, a server instance prints only messages of a NOTICE severity level or higher to standard out. (A subsequent section, Message Severity, describes severity levels.) You can modify the severity threshold so that the server prints more or fewer messages to standard out.

If you use the Node Manager to start a Managed Server, the messages that would otherwise be output to stdout or stderr when starting a Managed Server are instead displayed in the Administration Console and written to a single log file for that server instance, SERVER_NAME.out. The server instance's output log is located in the same logs directory, below the server instance root directory, along with the WebLogic Server SERVER_NAME.log file; for example, DOMAIN_NAME\servers\SERVER_NAME\logs\SERVER_NAME.out, where DOMAIN_NAME is the name of the directory in which you located the domain and SERVER_NAME is the name of the server.

The Node Manager writes its own startup and status messages to a single log file, NM_HOME/nodemanager.log, where NM_HOME designates the Node Manager installation directory, by default, WL_HOME/common/nodemanager.

For more information on Node Manager log files, see "Node Manager Configuration and Log Files" in Node Manager Administrator's Guide for Oracle WebLogic Server.

Subsystem Logs

The server log messages and log file communicate events and conditions that affect the operation of the server or the application. Some subsystems maintain additional log files to provide an audit of the subsystem's interactions under normal operating conditions. The following list describes each of the additional log files:

  • The HTTP subsystem keeps a log of all HTTP transactions in a text file. The default location and rotation policy for HTTP access logs is the same as the server log. You can set the attributes that define the behavior of HTTP access logs for each server or for each virtual host that you define. See "Setting Up HTTP Access Logs" in Configuring Server Environments for Oracle WebLogic Server and "Enable and configure HTTP logs" in the Oracle WebLogic Server Administration Console Help.

  • Each server has a transaction log which stores information about committed transactions coordinated by the server that may not have been completed. WebLogic Server uses the transaction log when recovering from system crashes or network failures. You cannot directly view the transaction log - the file is in a binary format.

    The Transaction Manager uses the default persistent store to store transaction log files. Using the Administration Console, you can change where the default store is located. See "Configure the default persistent store for Transaction Recovery Service migration" in the Oracle WebLogic Server Administration Console Help.

  • The WebLogic Auditing provider records information from a number of security requests, which are determined internally by the WebLogic Security Framework. The WebLogic Auditing provider also records the event data associated with these security requests, and the outcome of the requests. Configuring an Auditing provider is optional. The default security realm (myrealm) does not have an Auditing provider configured. See "Configuring the WebLogic Auditing Provider" in Securing Oracle WebLogic Server.

    All auditing information recorded by the WebLogic Auditing provider is saved in WL_HOME\DOMAIN_NAME\servers\SERVER_NAME\logs\DefaultAuditRecorder.log. Although an Auditing provider is configured per security realm, each server writes auditing data to its own log file in the server directory.

  • The JDBC subsystem records various events related to JDBC connections, including registering JDBC drivers and SQL exceptions. The events related to JDBC are now written to the server log, such as when connections are created or refreshed or when configuration changes are made to JDBC objects. See "Monitoring WebLogic JDBC Resources" in Configuring and Managing JDBC for Oracle WebLogic Server.

  • JMS logging is enabled by default when you create a JMS server, however, you must specifically enable it on message destinations in the JMS modules targeted to this JMS server (or on the JMS template used by destinations).

    JMS server log files contain information on basic message life cycle events, such as message production, consumption, and removal. When a JMS destination hosting the subject message is configured with message logging enabled, then each of the basic message life cycle events will generate a message log event in the JMS message log file.

    The message log is located in the logs directory, below the server instance root directory, DOMAIN_NAME\servers\SERVER_NAME\logs\jmsServers\SERVER_NAMEJMSServer\jms.messages.log, where DOMAIN_NAME is the name of the directory in which you located the domain and SERVER_NAME is the name of the server.

    After you create a JMS server, you can change the default name of its log file, as well as configure criteria for moving (rotating) old log messages to a separate file. See "Configure topic message logging" in the Oracle WebLogic Server Administration Console Help and "Monitoring JMS Statistics and Managing Messages" in Configuring and Managing JMS for Oracle WebLogic Server.

Log Message Format

When a WebLogic Server instance writes a message to the server log file, the first line of each message begins with #### followed by the message attributes. Each attribute is contained between angle brackets.

Here is an example of a message in the server log file:

####<Sept 22, 2004 10:46:51 AM EST> <Notice> <WebLogicServer> <MyComputer>
<examplesServer><main> <<WLS Kernel>> <> <null> <1080575211904> <BEA-000360> <Server started in RUNNING mode> 

In this example, the message attributes are: Locale-formatted Timestamp, Severity, Subsystem, Machine Name, Server Name, Thread ID, User ID, Transaction ID, Diagnostic Context ID, Raw Time Value, Message ID, and Message Text. (A subsequent section, Message Attributes, describes each attribute.)

If a message is not logged within the context of a transaction, the angle brackets for Transaction ID are present even though no Transaction ID is present.

If the message includes a stack trace, the stack trace is included in the message text.

WebLogic Server uses the host computer's default character encoding for the messages it writes.

Format of Output to Standard Out and Standard Error

When a WebLogic Server instance writes a message to standard out, the output does not include the #### prefix and does not include the Server Name, Machine Name, Thread ID, User ID, Transaction ID, Diagnostic Context ID, and Raw Time Value fields.

Here is an example of how the message from the previous section would be printed to standard out:

<Sept 22, 2004 10:51:10 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

In this example, the message attributes are: Locale-formatted Timestamp, Severity, Subsystem, Message ID, and Message Text.

Message Attributes

The messages for all WebLogic Server instances contain a consistent set of attributes as described in Table 2-1. In addition, if your application uses WebLogic logging services to generate messages, its messages will contain these attributes.

Table 2-1 Server Log Message Attributes

AttributeDescription

Locale-formatted Timestamp

Time and date when the message originated, in a format that is specific to the locale. The Java Virtual Machine (JVM) that runs each WebLogic Server instance refers to the host computer operating system for information about the local time zone and format.

Severity

Indicates the degree of impact or seriousness of the event reported by the message. See Message Severity.

Subsystem

Indicates the subsystem of WebLogic Server that was the source of the message; for example, Enterprise Java Bean (EJB) container or Java Messaging Service (JMS).

Machine Name

Server Name

Thread ID

Identifies the origins of the message:

  • Server Name is the name of the WebLogic Server instance on which the message was generated.

  • Machine Name is the DNS name of the computer that hosts the server instance.

  • Thread ID is the ID that the JVM assigns to the thread in which the message originated.

Log messages that are generated within a client JVM do not include these attributes. For example, if your application runs in a client JVM and it uses the WebLogic logging services, the messages that it generates and sends to the WebLogic client log files will not include these attributes.

User ID

The user ID under which the associated event was executed.

To execute some pieces of internal code, WebLogic Server authenticates the ID of the user who initiates the execution and then runs the code under a special Kernel Identity user ID.

Java EE modules such as EJBs that are deployed onto a server instance report the user ID that the module passes to the server.

Log messages that are generated within a client JVM do not include this field.

Transaction ID

Present only for messages logged within the context of a transaction.

Diagnostic Context ID

Context information to correlate messages coming from a specific request or application.

Raw Time Value

The timestamp in milliseconds.

Message ID

A unique six-digit identifier.

All message IDs that WebLogic Server system messages generate start with BEA- and fall within a numerical range of 0-499999.

Your applications can use a Java class called NonCatalogLogger to generate log messages instead of using an internationalized message catalog. The message ID for NonCatalogLogger messages is always 000000.

See "Writing Messages to the WebLogic Server Log" in Using Logging Services for Application Logging for Oracle WebLogic Server.

Message Text

A description of the event or condition.


Message Severity

The severity attribute of a WebLogic Server log message indicates the potential impact of the event or condition that the message reports.

Table 2-2 lists the severity levels of log messages from WebLogic Server subsystems, starting from the lowest level of impact to the highest.

Table 2-2 Message Severity

SeverityMeaning

TRACE

Used for messages from the Diagnostic Action Library. Upon enabling diagnostic instrumentation of server and application classes, TRACE messages follow the request path of a method.

See "Diagnostic Action Library" in Configuring and Using the Diagnostics Framework for Oracle WebLogic Server.

DEBUG

A debug message was generated.

INFO

Used for reporting normal operations; a low-level informational message.

NOTICE

An informational message with a higher level of importance.

WARNING

A suspicious operation or configuration has occurred but it might not affect normal operation.

ERROR

A user error has occurred. The system or application can handle the error with no interruption and limited degradation of service.

CRITICAL

A system or service error has occurred. The system can recover but there might be a momentary loss or permanent degradation of service.

ALERT

A particular service is in an unusable state while other parts of the system continue to function. Automatic recovery is not possible; the immediate attention of the administrator is needed to resolve the problem.

EMERGENCY

The server is in an unusable state. This severity indicates a severe system failure or panic.


WebLogic Server subsystems generate many messages of lower severity and fewer messages of higher severity. For example, under normal circumstances, they generate many INFO messages and no EMERGENCY messages.

If your application uses WebLogic logging services, it can use an additional severity level, DEBUG. See "Writing Debug Messages" in Using Logging Services for Application Logging for Oracle WebLogic Server.

Viewing WebLogic Server Logs

The WebLogic Server Administration Console provides a log viewer for all the log files in a domain. The log viewer can find and display the messages based on any of the following message attributes: date, subsystem, severity, machine, server, thread, user ID, transaction ID, context ID, timestamp, message ID, or message. It can also display messages as they are logged or search for past log messages. (See Figure 2-3.)

Figure 2-3 Log Viewer

Description of Figure 2-3 follows

For information about viewing, configuring, and searching message logs, see the following topics in the Oracle WebLogic Server Administration Console Help:

For a detailed description of log messages in WebLogic Server message catalogs, see Oracle Fusion Middleware Oracle WebLogic Server Message Catalog. This index of messages describes all of the messages emitted by WebLogic subsystems and provides a detailed description of the error, a possible cause, and a recommended action to avoid or fix the error. To view available details, click on the appropriate entry in the Range column (if viewing by range) or the Subsystem column (if viewing by subsystem).

Server Logging Bridge

The Server Logging Bridge provides a lightweight mechanism for applications that currently use Java Logging or Log4J Logging to have their log messages redirected to WebLogic logging services. Applications can use the Server Logging Bridge with their existing configuration; no code changes or programmatic use of the WebLogic Logging APIs is required.

To use the Server Logging Bridge, you only need to create a logging configuration properties file as described in the following sections. You do not need to reconfigure the logging API that is enabled for WebLogic logging services; the Server Logging Bridge works the same regardless of whether WebLogic logging services are currently configured for Java Logging (the default) or for Log4j.


Note:

Applications that use the com.oracle.wls namespace do not require the logging properties file, or any other configuration changes, to use the Server Logging Bridge.

Java Logging

For applications that use the Java Logging API, WebLogic Server exposes the Server Logging Bridge as handler object, weblogic.logging.ServerLoggingHandler. The logging implementation configured for WebLogic Server can be either Java Logging (the default), or Log4J Logging. When the handler receives an application log message, in the form of a java.util.logging.LogRecord object, the handler redirects the message to the WebLogic logging service destinations, such as stdout, server log, domain log, and so on, as appropriate.

The following information contained in the LogRecord determines how the log message is redirected:

  • Message severity level

    The severity level is automatically converted to one of the standard WebLogic logging service severity levels when the log message redirected.

  • Logger name

    The Server Logging Bridge handler publishes the application message to a logger in the WebLogic Logger tree matching the logger name contained in the LogRecord.

    If no logger name exists in the LogRecord, the message is published to the root logger.

  • Log Level

    The Level of the LogRecord is automatically converted to one of the standard WebLogic logging service severity levels when the log message redirected.

To use the Server Logging Bridge handler, create a logging.properties file to be passed as an argument in the server's weblogic.Server startup command. This properties file, which can be placed in any directory, registers the Server Logging Bridge handler in the application's logger tree. For detailed information about configuring Java Logging, see the following Java logging API documentation:

http://download.oracle.com/javase/6/docs/technotes/guides/logging/overview.html


Note:

As a best practice, configuring the Logger Severity level in the LogMBean.LoggerSeverityProperties attribute is recommended because it is dynamic and can be persisted in the domain's config.xml file. For more information, see Specifying Severity Level for WebLogic Server Subsystem Loggers.

Example 2-1 shows an example logging.properties file for an application that uses the Java Logging API.

Example 2-1 Example logging.properties File Using the ServerLoggingHandler

# Specify the handlers to create in the root logger
handlers = weblogic.logging.ServerLoggingHandler

# Register handlers for the com.foo.toyshop and its child loggers
com.foo.toyshop.handlers = java.util.logging.ConsoleHandler, weblogic.logging.ServerLoggingHandler
 
# Do not send the toyshop log messages to the root handler
com.foo.toyshop.useParentHandlers = false
 
# Set the default logging level for the root logger
.level = ALL
 
# Set the default logging level for new ConsoleHandler instances
java.util.logging.ConsoleHandler.level = INFO
 
# Set the default logging level for new FileHandler instances
weblogic.logging.ServerLoggingHandler.level = ALL

The following example shows passing the logging.properties file in the -Djava.util.logging.config.file argument to the weblogic.Server startup command:

java -Djava.util.logging.config.file=C:\mydomain\logging.properties weblogic.Server

Note:

When you start WebLogic Server by passing a logging.properties file as shown in the preceding example, the default Java logging.properties file located in JAVA_HOME/jre/lib is overridden. As an alternative to creating a separate logging.properties file that you explicitly pass to the weblogic.Server command, you can update the default Java logging.properties file with properties for using the Server Logging Bridge handler.

Log4J Logging

For applications that use the Log4J Logging API, WebLogic Server exposes the Server Logging Bridge as the appender object, weblogic.logging.log4j.ServerLoggingAppender. The logging implementation configured for WebLogic Server can be either Java Logging (the default), or Log4J Logging. When the appender receives an application log message, in the form of a org.apache.log4j.spi.LoggingEvent object, the appender redirects the message to the WebLogic logging service destinations such as stdout, server log, domain log, and so on, as appropriate.

The following information contained in the LoggingEvent determines how the log message is redirected:

  • Message severity level

    The severity level is automatically converted to one of the standard WebLogic logging service severity levels when the log message redirected.

  • Logger name

    The Server Logging Bridge appender publishes the application message to a logger in the WebLogic Log4J Logger tree matching the logger name contained in the LoggingEvent.

    If no logger name exists in the LoggingEvent, the message is published to the root logger.

To use the Server Logging Bridge appender, create a log4j.properties file to be included in the application classpath. The log4j.properties file registers the Server Logging Bridge appender in the application's logger tree. For detailed information about configuring Log4j logging, see the following Logging Services documentation published by logging.apache.org:

http://logging.apache.org/log4j/1.2/manual.html


Note:

As a best practice, configuring the Logger Severity level in the LogMBean.LoggerSeverityProperties attribute is recommended because it is dynamic and can be persisted in the domain's config.xml file. For more information, see Specifying Severity Level for WebLogic Server Subsystem Loggers.

Example 2-2 shows an example log4j.properties file for an application that uses Log4J Logging.

Example 2-2 Example log4j.properties File Using the ServerLoggingAppender

log4j.rootLogger=debug, stdout, server
 
# ***** stdout is set to be a ConsoleAppender.
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
 
log4j.appender.server=weblogic.logging.log4j.ServerLoggingAppender

Propagating Log Messages to the Root Logger

By default, log messages originating from loggers with the com.oracle.wls namespace that are redirected by the Server Logging Bridge are not propagated to the application's root logger. However, you can propagate messages to the application's root logger by enabling the LogMBean.ServerLoggingBridgeUseParentLoggersEnabled attribute.

For more information, see the description of Server Logging Bridge Uses Parent Loggers in "Servers: Logging: General" in Oracle WebLogic Server Administration Console Help.

Best Practice: Use Generic Overrides to Insert Logging Properties File

If you are using Log4j for application logging, the log4j.properties file can use the generic overrides feature in WebLogic Server to have this file inserted into your existing deployment plan directory structure. The generic overrides feature provides a convenient means to insert, or make changes to, specific resources types used by an application and to continue using the existing ClassLoader and resource loading rules and behaviors for the application, without having to revise the application JAR files.

For more information, see "Generic File Loading Overrides" in Deploying Applications to Oracle WebLogic Server.

PKKVPK\EOEBPS/dcommon/oracle.gifJGIF87aiyDT2F'G;Q_oKTC[ 3-Bq{ttsoGc4I)GvmLZ).1)!ꑈ53=Z]'yuLG*)g^!8C?-6(29K"Ĩ0Яl;U+K9^u2,@@ (\Ȱ Ë $P`lj 8x I$4H *(@͉0dа8tA  DсSP v"TUH PhP"Y1bxDǕ̧_=$I /& .)+ 60D)bB~=0#'& *D+l1MG CL1&+D`.1qVG ( "D2QL,p.;u. |r$p+5qBNl<TzB"\9e0u )@D,¹ 2@C~KU 'L6a9 /;<`P!D#Tal6XTYhn[p]݅ 7}B a&AƮe{EɲƮiEp#G}D#xTIzGFǂEc^q}) Y# (tۮNeGL*@/%UB:&k0{ &SdDnBQ^("@q #` @1B4i@ aNȅ@[\B >e007V[N(vpyFe Gb/&|aHZj@""~ӎ)t ? $ EQ.սJ$C,l]A `8A o B C?8cyA @Nz|`:`~7-G|yQ AqA6OzPbZ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#D@9E:*NJ}b|Z>_k7:d$z >&Vv󃏽WlR:RqJfGإd9Tm(ҝEtO}1O[xxEYt8,3v bFF )ǙrPNE8=O#V*Cc𹾾&l&cmCh<.P{ʦ&ۣY+Gxs~k5$> ӥPquŽўZt~Tl>Q.g> %k#ú:Kn'&{[yWQGqF}AЅ׮/}<;VYZa$wQg!$;_ $NKS}“_{MY|w7G!"\JtRy+贾d|o/;5jz_6fHwk<ѰJ#]kAȎ J =YNu%dxRwwbEQEQEQEQEQEQEQEQEQE'fLQZ(1F)hQ@X1KEQE-Q@ 1KE3h=iPb(((1GjZ(-ʹRPbR@ 1KE7`bڒyS0(-&)P+ ڎԴP11F)h&:LRmQ@Q@Š(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((_ğ<+F; sU%ԑ >,BH(uSU xþ1Wϲs${wgoQn_swB/'L\ܓFgԏZ ^dj^L^NmH Ҁ6(?nƓjh%ةlΣ /F6}pj2E3HgHЌ(UQR8oX,G8OB]>o9@$xWy'ڹOM=ҼWb"٠9-*r⬻zWokeh͝(F@n~X=q+⟇1b>ƑeIX.~C,o5የ-m;D Nʬ` `+CcE??Ki!R!cxw[ jvc}&Eٱ7T)8&þ/?os$wSn^bo:-4^js4JKm!#rv89>' O59t , \8r,Vk|IgxEv((RmĜ+bkz6,u/}-|.'<VÚ~tk,^cH61¢ !;M;Ėz[#CuAƶ+j_&*/;Q8d ǹHyAsM↷7l-6rò,%Fs;A*',}'f[]tݷs~UWhk?:4JE]WpcY=" ƚw/|_xSw(kycH#r28,X7D5Kh76 mɍ~0H;6194WpGӧգ%8Z&GdPƧo6kcO5Kv`{}fyq \`@?Kv=26OޝyAe Qɼ芍H8͟2敮j#;iѻm؏6+wTx;KYY\-%'Aӣ?|=\-ٴk+٬$ɷWo,y~^6n8LP+C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8tܤGQk(Ov xM\dK*Og b^ h% k+m#X,%mD6+ R/4w6n w+4JgF-E;@u #8>9x@vz򥝬KHXB.'<*O d6ZEҤynd H#Þ?Z+; BJU["5ie#fW§9]}z> hW_&2%*&J8w:G ;Iv_Ew\@7? ݲ\Wa^Odz ((((((((((((((((((((((((((((((gj7džG[Fm|ydw`+Qx M_kW*wcszdAEpegIl YDַn|g Oracle Legal Notices

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2014, Oracle and/or its affiliates. All rights reserved.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Alpha and Beta Draft Documentation Notice

If this document is in preproduction status:

This documentation is in preproduction status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.

Oracle Logo

PK0hPK\EOEBPS/dcommon/blafdoc.cssc@charset "utf-8"; /* Copyright 2002, 2011, Oracle and/or its affiliates. All rights reserved. Author: Robert Crews Version: 2011.8.12 */ body { font-family: Tahoma, sans-serif; /* line-height: 125%; */ color: black; background-color: white; font-size: small; } * html body { /* http://www.info.com.ph/~etan/w3pantheon/style/modifiedsbmh.html */ font-size: x-small; /* for IE5.x/win */ f\ont-size: small; /* for other IE versions */ } h1 { font-size: 165%; font-weight: bold; border-bottom: 1px solid #ddd; width: 100%; text-align: left; } h2 { font-size: 152%; font-weight: bold; text-align: left; } h3 { font-size: 139%; font-weight: bold; text-align: left; } h4 { font-size: 126%; font-weight: bold; text-align: left; } h5 { font-size: 113%; font-weight: bold; display: inline; text-align: left; } h6 { font-size: 100%; font-weight: bold; font-style: italic; display: inline; text-align: left; } a:link { color: #039; background: inherit; } a:visited { color: #72007C; background: inherit; } a:hover { text-decoration: underline; } a img, img[usemap] { border-style: none; } code, pre, samp, tt { font-family: monospace; font-size: 110%; } caption { text-align: center; font-weight: bold; width: auto; } dt { font-weight: bold; } table { font-size: small; /* for ICEBrowser */ } td { vertical-align: top; } th { font-weight: bold; text-align: left; vertical-align: bottom; } li { text-align: left; } dd { text-align: left; } ol ol { list-style-type: lower-alpha; } ol ol ol { list-style-type: lower-roman; } td p:first-child, td pre:first-child { margin-top: 0px; margin-bottom: 0px; } table.table-border { border-collapse: collapse; border-top: 1px solid #ccc; border-left: 1px solid #ccc; } table.table-border th { padding: 0.5ex 0.25em; color: black; background-color: #f7f7ea; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } table.table-border td { padding: 0.5ex 0.25em; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; } span.gui-object, span.gui-object-action { font-weight: bold; } span.gui-object-title { } p.horizontal-rule { width: 100%; border: solid #cc9; border-width: 0px 0px 1px 0px; margin-bottom: 4ex; } div.zz-skip-header { display: none; } td.zz-nav-header-cell { text-align: left; font-size: 95%; width: 99%; color: black; background: inherit; font-weight: normal; vertical-align: top; margin-top: 0ex; padding-top: 0ex; } a.zz-nav-header-link { font-size: 95%; } td.zz-nav-button-cell { white-space: nowrap; text-align: center; width: 1%; vertical-align: top; padding-left: 4px; padding-right: 4px; margin-top: 0ex; padding-top: 0ex; } a.zz-nav-button-link { font-size: 90%; } div.zz-nav-footer-menu { width: 100%; text-align: center; margin-top: 2ex; margin-bottom: 4ex; } p.zz-legal-notice, a.zz-legal-notice-link { font-size: 85%; /* display: none; */ /* Uncomment to hide legal notice */ } /*************************************/ /* Begin DARB Formats */ /*************************************/ .bold, .codeinlinebold, .syntaxinlinebold, .term, .glossterm, .seghead, .glossaryterm, .keyword, .msg, .msgexplankw, .msgactionkw, .notep1, .xreftitlebold { font-weight: bold; } .italic, .codeinlineitalic, .syntaxinlineitalic, .variable, .xreftitleitalic { font-style: italic; } .bolditalic, .codeinlineboldital, .syntaxinlineboldital, .titleinfigure, .titleinexample, .titleintable, .titleinequation, .xreftitleboldital { font-weight: bold; font-style: italic; } .itemizedlisttitle, .orderedlisttitle, .segmentedlisttitle, .variablelisttitle { font-weight: bold; } .bridgehead, .titleinrefsubsect3 { font-weight: bold; } .titleinrefsubsect { font-size: 126%; font-weight: bold; } .titleinrefsubsect2 { font-size: 113%; font-weight: bold; } .subhead1 { display: block; font-size: 139%; font-weight: bold; } .subhead2 { display: block; font-weight: bold; } .subhead3 { font-weight: bold; } .underline { text-decoration: underline; } .superscript { vertical-align: super; } .subscript { vertical-align: sub; } .listofeft { border: none; } .betadraft, .alphabetanotice, .revenuerecognitionnotice { color: #f00; background: inherit; } .betadraftsubtitle { text-align: center; font-weight: bold; color: #f00; background: inherit; } .comment { color: #080; background: inherit; font-weight: bold; } .copyrightlogo { text-align: center; font-size: 85%; } .tocsubheader { list-style-type: none; } table.icons td { padding-left: 6px; padding-right: 6px; } .l1ix dd, dd dl.l2ix, dd dl.l3ix { margin-top: 0ex; margin-bottom: 0ex; } div.infoboxnote, div.infoboxnotewarn, div.infoboxnotealso { margin-top: 4ex; margin-right: 10%; margin-left: 10%; margin-bottom: 4ex; padding: 0.25em; border-top: 1pt solid gray; border-bottom: 1pt solid gray; } p.notep1 { margin-top: 0px; margin-bottom: 0px; } .tahiti-highlight-example { background: #ff9; text-decoration: inherit; } .tahiti-highlight-search { background: #9cf; text-decoration: inherit; } .tahiti-sidebar-heading { font-size: 110%; margin-bottom: 0px; padding-bottom: 0px; } /*************************************/ /* End DARB Formats */ /*************************************/ @media all { /* * * { line-height: 120%; } */ dd { margin-bottom: 2ex; } dl:first-child { margin-top: 2ex; } } @media print { body { font-size: 11pt; padding: 0px !important; } a:link, a:visited { color: black; background: inherit; } code, pre, samp, tt { font-size: 10pt; } #nav, #search_this_book, #comment_form, #comment_announcement, #flipNav, .noprint { display: none !important; } body#left-nav-present { overflow: visible !important; } } PKr.hcPK\EOEBPS/dcommon/doccd_epub.jsM /* Copyright 2006, 2012, Oracle and/or its affiliates. All rights reserved. Author: Robert Crews Version: 2012.3.17 */ function addLoadEvent(func) { var oldOnload = window.onload; if (typeof(window.onload) != "function") window.onload = func; else window.onload = function() { oldOnload(); func(); } } function compactLists() { var lists = []; var ul = document.getElementsByTagName("ul"); for (var i = 0; i < ul.length; i++) lists.push(ul[i]); var ol = document.getElementsByTagName("ol"); for (var i = 0; i < ol.length; i++) lists.push(ol[i]); for (var i = 0; i < lists.length; i++) { var collapsible = true, c = []; var li = lists[i].getElementsByTagName("li"); for (var j = 0; j < li.length; j++) { var p = li[j].getElementsByTagName("p"); if (p.length > 1) collapsible = false; for (var k = 0; k < p.length; k++) { if ( getTextContent(p[k]).split(" ").length > 12 ) collapsible = false; c.push(p[k]); } } if (collapsible) { for (var j = 0; j < c.length; j++) { c[j].style.margin = "0"; } } } function getTextContent(e) { if (e.textContent) return e.textContent; if (e.innerText) return e.innerText; } } addLoadEvent(compactLists); function processIndex() { try { if (!/\/index.htm(?:|#.*)$/.test(window.location.href)) return false; } catch(e) {} var shortcut = []; lastPrefix = ""; var dd = document.getElementsByTagName("dd"); for (var i = 0; i < dd.length; i++) { if (dd[i].className != 'l1ix') continue; var prefix = getTextContent(dd[i]).substring(0, 2).toUpperCase(); if (!prefix.match(/^([A-Z0-9]{2})/)) continue; if (prefix == lastPrefix) continue; dd[i].id = prefix; var s = document.createElement("a"); s.href = "#" + prefix; s.appendChild(document.createTextNode(prefix)); shortcut.push(s); lastPrefix = prefix; } var h2 = document.getElementsByTagName("h2"); for (var i = 0; i < h2.length; i++) { var nav = document.createElement("div"); nav.style.position = "relative"; nav.style.top = "-1.5ex"; nav.style.left = "1.5em"; nav.style.width = "90%"; while (shortcut[0] && shortcut[0].toString().charAt(shortcut[0].toString().length - 2) == getTextContent(h2[i])) { nav.appendChild(shortcut.shift()); nav.appendChild(document.createTextNode("\u00A0 ")); } h2[i].parentNode.insertBefore(nav, h2[i].nextSibling); } function getTextContent(e) { if (e.textContent) return e.textContent; if (e.innerText) return e.innerText; } } addLoadEvent(processIndex); PKo"nR M PK\E OEBPS/toc.ncxo Oracle® Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server, 11g Release 1 (10.3.6) Cover Title and Copyright Information Contents Preface 1 Introduction and Roadmap 2 Understanding WebLogic Logging Services 3 Configuring WebLogic Logging Services 4 Filtering WebLogic Server Log Messages 5 Subscribing to Messages Copyright PKPK\EOEBPS/content.opf ( Oracle® Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server, 11g Release 1 (10.3.6) en-US E13739-05 Oracle Corporation Oracle Corporation Oracle® Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server, 11g Release 1 (10.3.6) 2011-11-03T12:04:18Z This document describes how you use WebLogic Server logging services to monitor server, subsystem, and application events. PK PK\EOEBPS/config_logs.htm Configuring WebLogic Logging Services

3 Configuring WebLogic Logging Services

The following sections describe WebLogic Server logging scenarios and basic configuration tasks. For detailed instructions on filtering and subscribing to messages, see Chapter 4, "Filtering WebLogic Server Log Messages," and Chapter 5, "Subscribing to Messages."

Configuration Scenarios

WebLogic Server system administrators and developers configure logging output and filter log messages to troubleshoot errors or to receive notification for specific events.

The following tasks describe some logging configuration scenarios:

  • Stop DEBUG and INFO messages from going to the log file.

  • Allow INFO level messages from the HTTP subsystem to be published to the log file, but not to standard out.

  • Specify that a handler publishes messages that are WARNING severity level or higher.

  • Track log information for individual servers in a cluster.

Overview of Logging Services Configuration

Volume control of logging is provided through the LogMBean interface. In the logging process, a logging request is dispatched to subscribed handlers or appenders. WebLogic Server provides handlers for sending log messages to standard out, the server log file, broadcasting messages to the domain log, remote clients, and a memory buffer for tail viewing log events in the WebLogic Server Administration Console. You can achieve volume control for each type of handler by filtering log messages based on severity level and other criteria. The LogMBean, described in Oracle WebLogic Server MBean Reference, defines attributes for setting the severity level and specifying filter criteria for WebLogic Server handlers.

In earlier versions of WebLogic Server, system administrators and developers had only programmatic access to loggers and handlers. In this release of WebLogic Server, you can configure handlers using MBeans, eliminating the need to write code for most basic logging configurations. The Administration Console and WebLogic Server Scripting Tool (WLST) provide an interface for interacting with logging MBeans. Additionally, you can specify LogMBean parameters on the command line using Dweblogic.log.attribute-name=value; for example, Dweblogic.log.StdoutSeverity=Debug. See "Message Output and Logging" in Command Reference for Oracle WebLogic Server.

For advanced usage scenarios and for configuring loggers, you use the Java Logging APIs.

Setting the severity level on a handler is the simplest type of volume control; for example, any message of a lower severity than the specified threshold severity level, will be rejected. For example, by default, the Stdout Handler has a NOTICE threshold severity level. Therefore, INFO and DEBUG level messages are not sent to standard out.

Configuring a filter on a handler lets you specify criteria for accepting log messages for publishing; for example, only messages from the HTTP and JDBC subsystems are sent to standard out.


Note:

The java.util.logging.LoggingPermission class, described at http://download.oracle.com/javase/6/docs/api/java/util/logging/LoggingPermission.html, is required for a user to change the configuration of a logger or handler. In production environments, we recommend using the Java Security Manager with java.util.logging.LoggingPermission enabled for the current user.

See "Using the Java Security Manager to Protect WebLogic Resources" in Programming Security for Oracle WebLogic Server, and see also the Java Logging Overview at http://download.oracle.com/javase/6/docs/technotes/guides/logging/overview.html.


The following sections describe in more detail the control points for configuring WebLogic Server logging behavior.

Using Log Severity Levels

Each log message has an associated severity level. The level gives a rough guide to the importance and urgency of a log message. WebLogic Server has predefined severities, ranging from TRACE to EMERGENCY, which are converted to a log level when dispatching a log request to the logger. A log level object can specify any of the following values, from lowest to highest impact:

TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY

You can set a log severity level on the logger and the handler. When set on the logger, none of the handlers receive an event which is rejected by the logger. For example, if you set the log level to NOTICE on the logger, none of the handlers will receive INFO level events. When you set a log level on the handler, the restriction only applies to that handler and not the others. For example, turning DEBUG off for the File Handler means no DEBUG messages will be written to the log file, however, DEBUG messages will be written to standard out.

See the description of the weblogic.logging.Severities class in the Oracle WebLogic Server API Reference for a description of the supported severity levels.

You set log levels for handlers and loggers using the Administration Console, WLST, or the command line. See Specifying Severity Level for Loggers. Loggers and handlers can also be configured through the API. See Setting the Severity Level for Loggers and Handlers.

Using Log Filters

To provide more control over the messages that a Logger object publishes, you can create and set a filter. A filter is a class that uses custom logic to evaluate the log record content which you use to accept or reject a log message; for example, to filter out messages of a certain severity level, from a particular subsystem, or according to specified criteria. The Logger object publishes only the log messages that satisfy the filter criteria. You can create separate filters for the messages that each server instance writes to its server log file, standard out, memory buffer, or broadcasts to the domain-wide message log.

You can associate a filter with loggers and handlers. You configure filters for handlers using the Administration Console, WLST, or the command line. There are LogFilterMBean attributes to define filters for Stdout, Log File, Log Broadcaster, and Memory Handlers, or you can implement custom filtering logic programmatically. The LogFilterMBean, described in the Oracle WebLogic Server MBean Reference, defines the filtering criteria based on user ID and subsystem. Filters for loggers are configured only through the API.

See Setting a Filter for Loggers and Handlers.

Logging Configuration Tasks: Main Steps

The following steps summarize how you configure and filter log messages that WebLogic Server generates. Related documentation and later sections in this guide describe these steps in more detail.

  1. Use the Administration Console to manage log files and configure the following logging options:

    1. Domain and server log file name and location, rotation pattern, location of archived log files, and number of log files stored. See "View and configure logs" in the Oracle WebLogic Server Administration Console Help.

    2. Types of messages that the server sends to standard out. See "Specify messages for standard out" in the Oracle WebLogic Server Administration Console Help.

    3. Which messages a server instance sends to the domain log. See "Forward messages to the domain log" in the Oracle WebLogic Server Administration Console Help.

    4. Log files for HTTP requests. See "Enable and configure HTTP logs" in the Oracle WebLogic Server Administration Console Help.

    5. Specify the logging implementation (Java Logging or Log4j). See How to Use Log4j with WebLogic Logging Services.

    6. 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 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 Filtering Messages by Severity Level or Other Criteria.

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.org/log4j/docs/.

WebLogic Server supports Log4j as a configuration option for WebLogic logging services. See 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 How to Use the Commons API with WebLogic Logging Services.

About Log4j

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

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 Specifying Severity Level for Loggers.

Appenders

Log4j defines appenders (handlers) to represent destinations for logging output. Multiple appenders can be defined. For example, an application might define an appender that sends log messages to standard out, and another appender that writes log messages to a file. Individual loggers might be configured to write to zero or more appenders. One example usage would be to send all logging messages (all levels) to a log file, but only ERROR level messages to standard out.

Layouts

Log4j defines layouts to control the format of log messages. Each layout specifies a particular message format. A specific layout is associated with each appender. This lets you specify a different log message format for standard out than for file output, for example.

How to Use Log4j with WebLogic Logging Services

WebLogic logging services use an implementation based on the Java Logging APIs by default. However, you can reconfigure WebLogic logging services to use Log4j instead.

To use Log4j instead of the default Java Logging, complete the following steps:

  1. Obtain a copy of the log4j.jar file. WebLogic Server does not provide a Log4j version in its distribution, but you can download one from Apache at the following location:

    http://logging.apache.org/log4j/

  2. Copy the log4j.jar file and the WL_HOME/server/lib/wllog4j.jar file to the server classpath, which you can do simply by copying both files into the DOMAIN_NAME/lib directory.There, they will be added to the server classpath dynamically during server startup.

    If you place these .jar files elsewhere, make sure that both are placed in the same directory and that you update the server classpath to include this directory.

  3. Configure WebLogic Server to use Log4j logging using one of the following methods:

When Log4j is enabled, you get a reference to the org.apache.log4j.Logger that the server is using from the weblogic.logging.log4j.Log4jLoggingHelper class.

With a Log4j Logger reference, you can attach you own custom appender to receive the server log events; for example, you might attach an appender that sends the server log events to Syslog or the Windows Event Viewer. Additionally, you can use the Logger reference to issue log requests to WebLogic logging services; this requires that the Log4j libraries be available to your deployed application.

If your application has no requirement to interact with WebLogic logging services, package the Log4j libraries in the application's LIB directory. The server logging will continue to use the default Java Logging implementation.

Example 3-2 is a Log4j code example that demonstrates using the Log4j Logger.

Using WLST to Configure and Enable Log4j for WebLogic Server Logging

This section explains how to use WLST to configure and enable Log4j logging instead of the default Java Logging. Java Logging is the default for client and server-side logging; Log4j is available only for server-side and not client-side logging.

Example 3-1 shows setting the value of the Log4jLoggingEnabled property to enable logging to a Log4j Logger in the Administration Server. Note that after you run such a script, restart the server for the settings to take effect.

Example 3-1 Enabling Log4j Logging

#invoke WLST
C:\>java weblogic.WLST
#connect WLST to an Administration Server
wls:/offline> connect('username','password') 
#navigate to the writable MBean configuration tree
wls:/mydomain/serverConfig> edit()
wls:/mydomain/edit> startEdit()
#set cmo to the server log config
wls:/mydomain/edit !> cd("Servers/myserver/Log/myserver")
#set log4j logging to true
wls:/mydomain/edit/Servers/myserver/Log/myserver !> cmo.setLog4jLoggingEnabled(true)
#save and activate the changes
wls:/mydomain/edit/Servers/myserver/Log/myserver !> save()
wls:/mydomain/edit/Servers/myserver/Log/myserver !> activate()

For more information about isLog4jLoggingEnabled, see LogMBean in the Oracle WebLogic Server MBean Reference.

You can enable Log4j for the server Logger as well as the domain Logger, which resides only on the Administration Server. The domain Log4j Logger reference is provided by invoking the weblogic.logging.log4j.Log4jLoggingHelper.getLog4jDomainLogger() method. Example 3-2 shows configuring the server Logger to use Log4j and the domain Logger to use the default Java Logger.

Example 3-2 Log4j Code Example

import org.apache.log4j.Logger;
import weblogic.logging.log4j.Log4jLoggingHelper;
import weblogic.logging.LoggerNotAvailableException;
/**
 * This example shows how to use the Log4j server Logger.
 */
public class MyLog4jTest {
  public void testWLSLog4j() {
    try {
      Logger logger = Log4jLoggingHelper.getLog4jServerLogger();
      logger.addAppender(myAppender); // The Appender is configured using either the log4j props file or other custom mechanism.
      logger.info("Test log message");
    } catch(LoggerNotAvailableException lex) {
    System.err.println("Unable to get a reference to the log4j Logger: "+
      lex.getMessage())
    }
  }
}

Example 3-3 is a Log4j logging configuration example that shows how to specify a severity level for Stdout and a filter for messages going to the server log file in the config.xml file.

Example 3-3 Logging Configuration Example

<con:log>
    <con:name>medrec</con:name>
    <con:file-name>medrec.log</con:file-name>
    <con:rotation-type>bySize</con:rotation-type>
    <con:file-min-size>20000</con:file-min-size>
    <con:log4j-logging-enabled>false</con:log4j-logging-enabled>
</con:log>
<con:log>
    <con:name>MedRecServer</con:name>
    <con:rotation-type>bySize</con:rotation-type>
    <con:file-min-size>20000</con:file-min-size>
    <con:stdout-severity>Debug</con:stdout-severity>
    <con:stdout-filter>MyFilter</con:stdout-filter>
    <con:log4j-logging-enabled>true</con:log4j-logging-enabled>
</con:log>
<con:log-filter>
    <con:name>MyFilter</con:name>
    <con:subsystem-name>HTTP</con:subsystem-name>
    <con:subsystem-name>IIOP</con:subsystem-name>
    <con:subsystem-name>JDBC</con:subsystem-name>
    <con:subsystem-name>JMS</con:subsystem-name>
</con:log-filter>

You have programmatic access to the Log4j Logger and its appenders (handlers) and layouts (formatters) for configuration purposes. See Setting a Severity Level and Filter on a Log4j Appender.

For more information about using WLST, see "Using the WebLogic Scripting Tool" in Oracle WebLogic Scripting Tool.

How to Use the Commons API with WebLogic Logging Services

WebLogic logging services provide the Commons LogFactory and Log interface implementations that direct requests to the underlying logging implementation being used by WebLogic logging services.

To use Commons Logging, put the WebLogic-specific Commons classes, $MW_HOME/modules/com.bea.core.weblogic.commons.logging_1.3.0.0.jar, together with the commons-logging.jar file in one of the following locations:

  • APP-INF/LIB or WEB-INF/LIB directory

  • DOMAIN_NAME/LIB directory

  • server CLASSPATH


    Note:

    WebLogic Server does not provide a Commons logging version in its distribution.

Example 3-4 illustrates how to use the Commons interface by setting the appropriate system property.


Note:

When you use the org.apache.commons.logging.LogFactory system property to implement the Commons interface as described here, you are implementing it for all application instances running on the server. For information on how to implement Commons logging for specific application instances, without affecting other applications, use the JDK service discovery mechanism or commons-logging.properties mechanism to specify the LogFactory as described at http://commons.apache.org/logging/apidocs/org/apache/commons/logging/LogFactory.html#getFactory().

  1. Set the system property org.apache.commons.logging.LogFactory to weblogic.logging.commons.LogFactoryImpl.

    This LogFactory creates instances of weblogic.logging.commons.LogFactoryImpl that implement the org.apache.commons.logging.Log interface.

  2. From the LogFactory, get a reference to the Commons Log object by name.

    This name appears as the subsystem name in the log file.

  3. Use the Log object to issue log requests to WebLogic logging services.

    The Commons Log interface methods accept an object. In most cases, this will be a string containing the message text.

    The Commons LogObject takes a message ID, subsystem name, and a string message argument in its constructor. See org.apache.commons.logging at http://jakarta.apache.org/commons/logging/api/index.html.

  4. The weblogic.logging.commons.LogImpl log methods direct the message to the server log.

Example 3-4 Commons Code Example

import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

public class MyCommonsTest {
  public void testWLSCommonsLogging() {
    System.setProperty(LogFactory.FACTORY_PROPERTY,
      "weblogic.logging.commons.LogFactoryImpl");
    Log clog = LogFactory.getFactory().getInstance("MyCommonsLogger");
    // Log String objects
    clog.debug("Hey this is common debug");
    clog.fatal("Hey this is common fatal", new Exception());
    clog.error("Hey this is common error", new Exception());
    clog.trace("Dont leave your footprints on the sands of time");
  }
}

Specifying Severity Level for Loggers

WebLogic Server provides a hierarchical Logger tree that lets you specify the Severity level for:

  • Generated Message Catalog Logger classes from the XML I18N catalog using weblogic.i18ngen.

  • Instances of the Commons Logging APIs when the WebLogic Server implementation of the Commons org.apache.commons.logging.LogFactory interface is enabled.

All Loggers inherit their Severity level from the nearest parent in the tree. You can, however, explicitly set the Severity level of a Logger, thereby overriding the level that is set for the nearest parent. You can set the Severity level for loggers from the Administration Console, WLST, or the command line.

Specifying Severity Level for WebLogic Server Subsystem Loggers

If you are using the Message Catalog Loggers, the Severity level for messages coming from a specific subsystem are determined by the Severity level of the root Logger. You can override the root Logger Severity level for individual subsystem Loggers such as the DeploymentService Logger, Security Logger, or EJB Logger. For example, suppose the root Logger severity level is CRITICAL, and you want to set the Severity Level to NOTICE for the Security subsystem logger and to WARNING for the EJB subsystem logger. You can do this from the Administration Console, WLST, or from the command line:

  • From the Administration Console, create the following entries in the Logger severities properties box of the Logging > General tab for the server. Note that each string is entered on an individual line in this properties box; that is, press the Enter key after each string, then click Save.

    Security=Notice
    EJB=Warning
    
  • Via WLST, use the set command to set the value of the LoggerSeverityProperties attribute of the LogMBean (see Oracle WebLogic Scripting Tool).

  • From the command line, specify the following parameter in the startup command:

    -Dweblogic.Log.LoggerSeverityProperties="Security=Notice;EJB=Warning"
    

    For a complete index of all subsystem names, see Oracle Fusion Middleware Oracle WebLogic Server Message Catalog. The subsystem name is case-sensitive and must be entered exactly as shown in the Subsystem column of the index.

Specifying the Severity Level for Commons Logging API Loggers

If you are using the Commons Logging API, logger names follow the Java package dot notation naming convention. For example, logger names could be a.b.FooLogger or a.b.c.Barlogger, corresponding t7uo the name of the classes in which they are used. In this case, each dot-separated identifier appears as a node in the Logger tree. For example, there will be a child node named "a" under the root Logger, a child node named "b" whose parent is "a", and so on.

You can configure the Severity for a package or for any Logger at any level in the tree. For example, if you specify the Severity level for package a.b=Info, then DEBUG and TRACE messages coming from all child nodes of package a.b will be blocked. You can, however, override the Severity level of a parent node by explicitly setting a value for a child node. For example, if you specify the Severity level for logger a.b.FooLogger=Debug, all log messages from FooLogger will be allowed, while DEBUG and TRACE messages will still be filtered for other child nodes under a.b.

You can specify the severity level for a package or Logger from the Administration Console, WLST, or the command line:

  • From the Administration Console, enter the following semicolon-separated string in the Logger severities properties box of the Logging > General tab page for the server.

    a.b=Info;a.b.FooLogger=Debug 
    
  • Via WLST, use the set command to set the value of the LoggerSeverityProperties attribute of the LogMBean (see Oracle WebLogic Scripting Tool).

  • From the command line, specify the following parameter in the startup command:

    -Dweblogic.Log.LoggerSeverityProperties="a.b=Info;a.b.FooLogger=Debug"
    

Rotating Log Files

By default, when you start a WebLogic Server instance in development mode, the server automatically renames (rotates) its local server log file as SERVER_NAME.log.n. For the remainder of the server session, log messages accumulate in SERVER_NAME.log until the file grows to a size of 500 kilobytes.

Each time the server log file reaches this size, the server renames the log file and creates a new SERVER_NAME.log to store new messages. By default, the rotated log files are numbered in order of creation filenamennnnn, where filename is the name configured for the log file. You can configure a server instance to include a time and date stamp in the file name of rotated log files; for example, server-name-%yyyy%-%mm%-%dd%-%hh%-%mm%.log.

By default, when you start a server instance in production mode, the server rotates its server log file whenever the file grows to 5000 kilobytes in size. It does not rotate the local server log file when you start the server. For more information about changing the mode in which a server starts, see "Change to production mode" in the Oracle WebLogic Server Administration Console Help.

You can change these default settings for log file rotation. For example, you can change the file size at which the server rotates the log file or you can configure a server to rotate log files based on a time interval. You can also specify the maximum number of rotated files that can accumulate. After the number of log files reaches this number, subsequent file rotations delete the oldest log file and create a new log file with the latest suffix.


Note:

WebLogic Server sets a threshold size limit of 500 MB before it forces a hard rotation to prevent excessive log file growth.

For information on setting up log file rotation, see "Rotate log files" in the Oracle WebLogic Server Administration Console Help.

To cause the immediate rotation of the server, domain, or HTTP access log file, use the LogRuntime.forceLogRotation() method. See LogRuntimeMBean in the Oracle WebLogic Server MBean Reference.

The WLST commands in Example 3-5 cause the immediate rotation of the server log file.

Example 3-5 Log Rotation on Demand

#invoke WLST
C:\>java weblogic.WLST
#connect WLST to an Administration Server
wls:/offline> connect('username','password')
#navigate to the ServerRuntime MBean hierarchy
wls:/mydomain/serverConfig> serverRuntime()
wls:/mydomain/serverRuntime>ls()
#navigate to the server LogRuntimeMBean
wls:/mydomain/serverRuntime> cd('LogRuntime/myserver')
wls:/mydomain/serverRuntime/LogRuntime/myserver> ls()
-r--   Name                                         myserver
-r--   Type                                         LogRuntime
-r-x   forceLogRotation                             java.lang.Void :
#force the immediate rotation of the server log file
wls:/mydomain/serverRuntime/LogRuntime/myserver> cmo.forceLogRotation()
wls:/mydomain/serverRuntime/LogRuntime/myserver>

The server immediately rotates the file and prints the following message:

<Mar 2, 2005 3:23:01 PM EST> <Info> <Log Management> <BEA-170017> <The log file
C:\diablodomain\servers\myserver\logs\myserver.log will be rotated. Reopen the
log file if tailing has stopped. This can happen on some platforms like Windows.>
<Mar 2, 2005 3:23:01 PM EST> <Info> <Log Management> <BEA-170018> <The log file
has been rotated to C:\diablodomain\servers\myserver\logs\myserver.log00001. Log
messages will continue to be logged in C:\diablodomain\servers\myserver\logs\myserver.log.>

Specifying the Location of Archived Log Files

By default, the rotated files are stored in the same directory where the log file is stored. You can specify a different directory location for the archived log files by using the Administration Console or setting the LogFileRotationDir property of the LogFileMBean from the command line. See LogFileMBean in the Oracle WebLogic Server MBean Reference.

The following command specifies the directory location for the archived log files using the -Dweblogic.log.LogFileRotationDir Java startup option:

java -Dweblogic.log.LogFileRotationDir=c:\foo
-Dweblogic.management.username=installadministrator
-Dweblogic.management.password=installadministrator weblogic.Server

Notification of Rotation

When the log file exceeds the rotation threshold that you specify, the server instance prints a log message that states that the log file will be rotated. Then it rotates the log file and prints an additional message that indicates the name of the file that contains the old messages.

For example, if you set up log files to rotate by size and you specify 500K as the minimum rotation size, when the server determines that the file is greater than 500K in size, the server prints the following message:

<Sept 20, 2004 1:51:09 PM EST> <Info> <Log Management> <MachineName>
<MedRecServer> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS
Kernel>> <> <> <1095692939895> <BEA-170017> <The log file
C:\Oracle\Middleware\wlserver_10.3\samples\domains\medrec\servers\MedRecServer\logs\medrec.log will be rotated.
Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.> 

The server immediately rotates the file and prints the following message:

<Sept 20, 2004 1:51:09 PM EST> <Info> <Log Management> <MachineName>
<MedRecServer> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> 
<<WLS Kernel>> <> <> <1095692939895> <BEA-170018> <The log file has been rotated
to C:\Oracle\Middleware\wlserver_10.3\samples\domains\medrec\servers\MedRecServer\logs\medrec.log00001. 
Log messages will continue to be logged in C:\Oracle\Middleware\wlserver_10.3\samples\domains\medrec\servers\MedRecServer\logs\medrec.log.>

Note that the severity level for both messages is INFO. The message ID for the message before rotation is always BEA-170017 and the ID for the message after rotation is always BEA-170018.

File systems such as the standard Windows file system place a lock on files that are open for reading. On such file systems, if your application is tailing the log file, or if you are using a command such as the DOS tail -f command in a command prompt, the tail operation stops after the server has rotated the log file. The tail -f command prints messages to standard out as lines are added to a file. For more information, enter help tail in a DOS prompt.

To remedy this situation for an application that tails the log file, you can create a JMX listener that notifies your application when the server emits the log rotation message. When your application receives the message, it can restart its tailing operation. To see an example of a JMX listener, see Chapter 5, "Subscribing to Messages."

Redirecting JVM Output

The JVM in. which a WebLogic Server instance runs, sends messages to standard error and standard out. Server as well as application code write directly to these streams instead of using the logging mechanism. Through a configuration option, you can redirect the JVM output to all the registered log destinations, like the server terminal console and log file. When enabled, a log entry appears as a message of NOTICE severity. Redirecting the JVM output does not capture output from native code, for example thread dumps from the JVM.

For example, to redirect the JVM standard out messages:

  • When you start the Administration Server, include the following Java option in the weblogic.Server command:

    -Dweblogic.log.RedirectStdoutToServerLogEnabled=true
    

    See "weblogic.Server Configuration Options" in Command Reference for Oracle WebLogic Server.

  • After the Administration Server has started, use the Administration Console to redirect the JVM standard out messages. See "Redirect JVM output" in the Oracle WebLogic Server Administration Console Help.

  • Use the WLST to change the value of the RedirectStdoutToServerLogEnabled property of the LogMBean and re-start the server.

    The WLST commands in Example 3-6 redirect the JVM standard out messages in the Administration Server to the server logging destinations.

Example 3-6 Redirecting Stdout to Server Logging Destinations

C:\>java weblogic.WLST
wls:/offline> connect('username','password')
wls:/mydomain/serverConfig> edit()
wls:/mydomain/edit> startEdit()
wls:/mydomain/edit !> cd("Servers/myserver/Log/myserver")
wls:/mydomain/edit/Servers/myserver/Log/myserver !> cmo.setRedirectStdoutToServerLogEnabled(true)
wls:/mydomain/edit/Servers/myserver/Log/myserver !> save()
wls:/mydomain/edit/Servers/myserver/Log/myserver !> activate()

For more information about using WLST, see "Navigating MBeans (WLST Online)" inOracle WebLogic Scripting Tool. For more information about RedirectStdoutToServerLogEnabled, see LogMBean in the Oracle WebLogic Server MBean Reference.

PK" PK\EOEBPS/intro.htm Introduction and Roadmap

1 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 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. It also 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 Java Platform, Enterprise Edition (Java EE) 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 Java EE 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 corporate Web site provides all documentation for WebLogic Server. Specifically, "View and configure logs" in the Oracle WebLogic Server Administration Console Help describes how to view and configure log files that a WebLogic Server instance generates, and Using Logging Services for Application Logging for Oracle WebLogic Server 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, Oracle provides a variety of logging code samples that show logging configuration and API use.

Avitek Medical Records Application (MedRec) and Tutorials

MedRec is an end-to-end sample Java EE 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 Java EE features, and highlights 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 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 Start menu.

New and Changed Logging Features in This Release

For a comprehensive listing of the new WebLogic Server features introduced in this release, see What's New in Oracle WebLogic Server.

PKPK\EOEBPS/img/log_viewer2.gifCjGIF89a*!J111R!!!!!)!Bc!R!!!!)JZ)J{)!1111Rk1R1R1c19999B991BBBBc{BcBcBsB9JJJJsJJRRRRkRsRsR{RRZZcZ{Zc99cccccck!!kkkk{kkkksssss{){{s{{{{{{{֌ccΌ֌ޔƔ!!J9֜Μ֜ΔΜ֜便ƥ֥Υ֥ޥΥ֜ƭƭέޭޭέޥֵεֵ޵スνֽ޽))!!))1!1!9)1)9)B1B9JBRJRJZRZRcZcZkckcsksk{s{s{{1c,* H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]4PJJիXjʵׯ`ÊKٳhӪ]˶۷p ùx˷߿ Lߺw +^̸ǐ#KL+ĕ3k̹ϠCYӨS^ͺT]˞M۸~U[2^j .0ifEZY WLoV!\,YD5oрzo^K_VAC *b0؉B*"(!*GU3LUB‹yȠr|WuK*Έ6WV(& g@)5U43P\3 1I (״2MB%5R6Si *J6SA.te$c"Uy)$G7W>E %P(g|PiYrUՁ p@ )ꨤ:F$Sq&0xVL1ftUuQ#)p)T6r]VvBUʠ4_]QT5t L[Sq;[@!%.KtpE+/_y3V˜7ش U *H *X+4U2.{UO -U( @u@lw8!8RrYhmqP$:IAQ♤jHSK"!% >.}fsT61(HϘOI 6AgsC)n07(:cAD!) C4)smE[<6S*M1KB3 x5f%bap4 hSn ²4^qXU)F\) &L+Fs/$INcW AQɕA~<]BVΩ` rH7j_F X-"V$F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ebLogic logging services provide several filtering options that give you the flexibility to determine which messages are written to WebLogic Server log files and standard out, and which are written to the log file and standard out that a client JVM maintains. Most of these filtering features are implementations of the Java Logging APIs, which are available in the java.util.logging package.

The following sections describe how to filter messages that the WebLogic logging services generate:

For related information, see:

The Role of Logger and Handler Objects

When WebLogic Server message catalogs and the NonCatalogLogger generate messages, they distribute their messages to a java.util.logging.Logger object. The Logger object publishes the messages to any message handler that has subscribed to the Logger.

WebLogic Server instantiates Logger and Handler objects in three distinct contexts (See Figure 4-1):

  • In client JVMs that use WebLogic logging services. This client Logger object publishes messages that are sent from client applications running in the client JVM.

    The following handlers subscribe to the Logger object in a client JVM:

    • ConsoleHandler, which prints messages from the client JVM to the client's standard out.

      If you use the -Dweblogic.log.StdoutSeverityLevel Java startup option for the client JVM, WebLogic logging services create a filter for this handler that limits the messages that the handler writes to standard out. See "Writing Messages from a Client Application" in Using Logging Services for Application Logging for Oracle WebLogic Server.

    • FileStreamHandler, which writes messages from the client JVM to the client's log file.

  • In each instance of WebLogic Server. This server Logger object publishes messages that are sent from subsystems and applications that run on a server instance.

    The following handlers subscribe to the server Logger object:

    • ConsoleHandler, which makes messages available to the server's standard out.

    • FileStreamHandler, which writes messages to the server log file.

    • An internal handler, which broadcasts messages to the domain log and JMX clients, and publishes messages to the Administration Server.

  • The Administration Server maintains a domain Logger object in addition to a server Logger object. The domain Logger object receives messages from each Managed Server's Logger object.

    The following handler subscribes to the domain Logger object:

    • FileStreamHandler, which writes messages to the domain log file.

Figure 4-1 WebLogic Logging Services Contexts

Description of Figure 4-1 follows

Filtering Messages by Severity Level or Other Criteria

When WebLogic Server message catalogs and the NonCatalogLogger generate messages, they convert the message severity to a weblogic.logging.WLLevel object. A WLLevel object can specify any of the following values, from lowest to highest impact:

TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY

By default, a Logger object publishes messages of all levels. To set the lowest-level message that a Logger object publishes, you use a simple Logger.setLevel API. When a Logger object receives an incoming message, it checks the message level with the level set by the setLevel API. If the message level is below the Logger level, it returns immediately. If the message level is above the Logger level, the Logger allocates a WLLogRecord object to describe the message.

For example, if you set a Logger object level to WARNING, the Logger object publishes only WARNING, ERROR, CRITICAL, ALERT, or EMERGENCY messages.

To provide more control over the messages that a Logger object publishes, you can also create and set a filter. A filter is a class that compares data in the WLLogRecord object with a set of criteria. The Logger object publishes only the WLLogRecord objects that satisfy the filter criteria. For example, a filter can configure a Logger to publish only messages from the JDBC subsystem. To create a filter, you instantiate a java.util.logging.Filter object and use the Logger.setFilter API to set it for a Logger object.

Instead of (or in addition to) setting the level and a filter for the messages that a Logger object publishes, you can set the level and filters on individual message handlers.

For example, you can specify that a Logger publishes messages that are of the WARNING level or higher. Then you can do the following for each handler:

  • For the ConsoleHandler, set a level and filter that selects only ALERT messages from the JDBC, JMS, and EJB subsystems. This causes standard out to display only ALERT messages from the JDBC, JMS, and EJB subsystems.

  • For the FileStreamHandler, set no additional level or filter criteria. Because the Logger object has been configured to publish only messages of the WARNING level or higher, the log file will contain all messages from all subsystems that are of WARNING severity level or higher.

  • Publish all messages of WARNING severity level or higher to the domain-wide message log on the Administration Server.

Setting the Severity Level for Loggers and Handlers

The Administration Console and WLST provide a way to set the severity level for a Handler object through standard MBean commands. To set the Severity level for a Logger object, you can use the Logger API. You can also set the Severity level for a Logger via the Administrator Console, WLST, or the command line; see Specifying Severity Level for Loggers. To configure Logger and Handler severity level for WLS clients (such as EJB and Web Service clients), you must use the Java Logging API.

Setting the Level for Loggers

To set the severity level for a Logger object, create a class that does the following:

  1. Invokes one of the following LoggingHelper methods:

    • getClientLogger if the current context is a client JVM.

    • getServerLogger if the current context is a server JVM and you want to retrieve the Logger object that a server uses to manage its local server log.

    • getDomainLogger if the current context is the Administration Server and you want to retrieve the Logger object that manages the domain log.

    The LoggerHelper method returns a Logger object. See the API documentation for the Logger class at http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html.

  2. Invokes the Logger.setLevel(Level level) method.

    To set the level of a WebLogic Server Logger object, you must pass a value that is defined in the weblogic.logging.WLLevel class. WebLogic Server maps the java.util.logging.Level to the appropriate WLLevel. For a list of valid values, see the description of the weblogic.logging.WLLevel class in the Oracle WebLogic Server API Reference.

    For example:

    setLevel(WLLevel.ALERT) 
    

Setting the Level for Handlers

To set the severity level for a Handler object using the API, create a class that does the following (See Example 4-1):

  1. Invokes one of the following LoggingHelper methods:

    • getClientLogger if the current context is a client JVM.

    • getServerLogger if the current context is a server JVM and you want to retrieve the Logger object that a server uses to manage its local server log.

    • getDomainLogger if the current context is the Administration Server and you want to retrieve the Logger object that manages the domain log.

    The LoggerHelper method returns a Logger object. See the API documentation for the Logger class at http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html.

  2. Invokes the Logger.getHandlers() method.

    The method returns an array of all handlers that are registered with the Logger object.

  3. Iterates through the list of handlers until it finds the Handler object for which you want to set a level.

    Use Handler.getClass().getName() to determine the type of handler to which the current array index refers.

  4. Invokes the Handler.setLevel(Level level) method.

    To set the level of a WebLogic Server Handler object, you must pass a value that is defined in the weblogic.logging.WLLevel class. WebLogic Server maps the java.util.logging.Level to the appropriate WLLevel. For a list of valid values, see the description of the weblogic.logging.WLLevel class in the Oracle WebLogic Server API Reference.

    For example:

    setLevel(WLLevel.ALERT) 
    

Example 4-1 Example: Setting Level for a Handler Object Using the API

import java.util.logging.Logger;
import java.util.logging.Handler;
import weblogic.logging.LoggingHelper;
import weblogic.logging.WLLevel;
public class LogLevel {
    public static void main(String[] argv) throws Exception {
        Logger serverlogger = LoggingHelper.getServerLogger();
        Handler[] handlerArray = serverlogger.getHandlers();
        for (int i=0; i < handlerArray.length; i++) {
            Handler h = handlerArray[i];
            if(h.getClass().getName().equals
                      ("weblogic.logging.ConsoleHandler")){
                h.setLevel(WLLevel.ALERT);
            }
        }
    }
}

You can configure the severity level for a Handler object through the LogMBean interface using the Administration Console or the command line:

  • See "Filter log messages" in the Oracle WebLogic Server Administration Console Help, for information on setting a severity level.

  • The WLST commands in Example 4-2 set the severity level for the Stdout Handler to INFO.

Example 4-2 Setting the Severity Level for the Stdout Handler

C:\>java weblogic.WLST
wls:/offline> connect('username','password')
wls:/mydomain/serverConfig> edit()
wls:/mydomain/edit> startEdit()
wls:/mydomain/edit !> cd("Servers/myserver/Log/myserver")
wls:/mydomain/edit/Servers/myserver/Log/myserver !> cmo.setStdoutSeverity("Info")
wls:/mydomain/edit/Servers/myserver/Log/myserver !> save()
wls:/mydomain/edit/Servers/myserver/Log/myserver !> activate()

For more information about using WLST, see "Using the WebLogic Scripting Tool" in Oracle WebLogic Scripting Tool. For more information about setStdoutSeverity, see LogMBean in the Oracle WebLogic Server MBean Reference.

Setting a Filter for Loggers and Handlers

When you set a filter on the Logger object, the filter specifies which messages the object publishes; therefore, the filter affects all handlers that are registered with the Logger object as well. When you set a filter on a handler, the filter affects only the behavior of the specific handler.

The Administration Console and WLST provide a way to set a filter on the Handler object through standard MBean commands. To set a filter on the Logger object, you must use the Logger API. For client-side logging, the only way to set a filter is through using the Java Logging API.

To set a filter:

  1. Create a class that implements java.util.logging.Filter. See Example 4-3.

    The class must include the Filter.isLoggable method and logic that evaluates incoming messages. If the logic evaluates as true, the isLoggable method enables the Logger object to publish the message.

  2. Place the filter object in the classpath of the JVM on which the Logger object is running.

  3. To set a filter for a Logger object, create a class that does the following:

    1. Invokes one of the following LoggingHelper methods:

    • getClientLogger if the current context is a client JVM.

    • getServerLogger if the current context is a server JVM and you want to filter the Logger object that a server uses to manage its local server log.

    • getDomainLogger if the current context is the Administration Server and you want to filter the Logger object that manages the domain server log.

    1. Invokes the Logger.setFilter(Filter newFilter) method.

  4. To set a filter for a Handler object using the API, create a class that does the following:

    1. Invokes one of the following LoggingHelper methods:

    • getClientLogger if the current context is a client JVM.

    • getServerLogger if the current context is a server JVM and you want to filter the Logger object that a server uses to manage its local server log.

    • getDomainLogger if the current context is the Administration Server and you want to filter the Logger object that manages the domain server log.

    1. Iterates through the list of handlers until it finds the Handler object for which you want to set a level.

      Use Handler.getClass().getName() to determine the type of handler to which the current array index refers.

    2. Invokes the Handler.setFilter(Filter newFilter) method.

Example 4-3 provides an example class that rejects all messages from the Deployer subsystem.

Example 4-3 Example Filter for a Java Logger Object

import java.util.logging.Logger;
import java.util.logging.Filter;
import java.util.logging.LogRecord;
import weblogic.logging.WLLogRecord;
import weblogic.logging.WLLevel;
public class MyFilter implements Filter {
    public boolean isLoggable(LogRecord record) {
        if (record instanceof WLLogRecord) {
            WLLogRecord rec = (WLLogRecord)record;
            if (rec.getLoggerName().equals("Deployer")) {
              return false;
            } else {
              return true;
            }
        } else {
          return false;
        }
    }
}

You can configure a filter for a Handler object through the LogMBean interface using the Administration Console or the command line:

  • See "Create log filters" for information on setting up a log filter for a WebLogic Server instance in the Oracle WebLogic Server Administration Console Help.

  • The WLST commands in Example 4-4 create and set a filter on the Domain Log Broadcaster.

Example 4-4 Setting up a Domain Log Filter

C:\>java weblogic.WLST
wls:/offline> connect('username','password')
wls:/mydomain/serverConfig> edit()
wls:/mydomain/edit> startEdit()
wls:/mydomain/edit !> cmo.createLogFilter('myFilter')
wls:/mydomain/edit !> cd("Servers/myserver/Log/myserver")
wls:/mydomain/edit/Servers/myserver/Log/myserver !> cmo.setDomainLogBroadcastFilter(getMBean('/LogFilters/myFilter'))
wls:/mydomain/edit/Servers/myserver/Log/myserver !> save()
wls:/mydomain/edit/Servers/myserver/Log/myserver !> activate()

For more information about using WLST, see "Using the WebLogic Scripting Tool" in Oracle WebLogic Scripting Tool. For more information about setDomainLogBroadcastFilter, see LogMBean in the Oracle WebLogic Server MBean Reference.

Filtering Domain Log Messages

To filter the messages that each Managed Server publishes to the domain log, you can use the Administration Console (see "Create log filters") or WLST (see Example 4-4) to create a log filter for the domain log.

Any Java Logging severity level or filter that you set on the Logger object that manages a server instance's log file supersedes a domain log filter. For example, if the level of the server Logger object is set to WARNING, a domain log filter will receive only messages of the WARNING level or higher.

You can define a domain log filter which modifies the set of messages that one or more servers send to the domain log. By default, all messages of severity NOTICE or higher are sent.


Note:

Messages of severity DEBUG are never sent to the domain log, even if you use a filter.

See "Filter log messages" in the Oracle WebLogic Server Administration Console Help, which describes configuring a domain log filter for a WebLogic Server instance using the Administration Console.

Setting a Severity Level and Filter on a Log4j Appender

The Administration Console and WLST provide a way to set the level for an Appender object through standard MBean commands. To set the level for a Logger object, you can use the Logger API as described in this section, or you can do so from the Administration Console, WLST, or the command line as described in Specifying Severity Level for Loggers.

To set the level for an Appender object using the API, create a class that does the following:

  1. Invokes the one of the following Log4jLoggingHelper methods (See Example 4-5).

    • getLog4jServerLogger if the current context is a server JVM and you want to retrieve the Logger object that a server uses to manage its local server log.

    • getLog4jDomainLogger if the current context is the Administration Server and you want to retrieve the Logger object that manages the domain log.

  2. Invokes the logger.getAllAppenders() method.

    Enumeration e = logger.getAllAppenders();
    

    The method returns all the appenders that are registered with the Logger object.

  3. Iterates through the list of appenders and gets each appender name.

  4. Invokes the app.setThreshold(WLLog4jLevel level) method.

    To set the level of a Log4j Appender object, you must pass a value that is defined in the weblogic.logging.log4j.WLLog4jLevel class. WebLogic Server maps the org.apache.log4j.Level to the appropriate WLLevel. For a list of valid values, see the description of the weblogic.logging.WLLevel class in the Oracle WebLogic Server API Reference.

To set a filter, implement a class that extends org.apache.log4j.Filter and adds the filter to the Appender, invoke the app.addFilter(Filter newFilter) method.

Example 4-5 provides an example class that does the following:

  • Publishes messages of the WARNING level or higher in the server log.

  • Publishes messages of the INFO level or higher to standard out.

  • Rejects INFO messages from the HTTP subsystem.

Example 4-5 Example: Setting a Log4j Level and Filter

package weblogic.logging.examples;
import java.util.Enumeration;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Logger;
import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.LoggingEvent;
import weblogic.logging.LoggerNotAvailableException;
import weblogic.logging.NonCatalogLogger;
import weblogic.logging.Severities;
import weblogic.logging.log4j.AppenderNames;
import weblogic.logging.log4j.Log4jLoggingHelper;
import weblogic.logging.log4j.WLLog4jLevel;
import weblogic.logging.log4j.WLLog4jLogEvent;
/**
 * This class sets a level and filter on a Log4j Appender.
 */
public class Log4jFilterExamplesStartup {
  public static void main(String[] args) {
    try {
      System.out.println("Invoked the log4j filter example startup class");
      Logger logger = Log4jLoggingHelper.getLog4jServerLogger();
      Enumeration e = logger.getAllAppenders();
      while (e.hasMoreElements()) {
        AppenderSkeleton app = (AppenderSkeleton) e.nextElement();
        String name = app.getName();
        if (name == null) continue;
        if (name.equals(AppenderNames.LOG_FILE_APPENDER)) { 
          // Set the threshold level of messages going to the log file to WARNING
          // This will result in NOTICE, INFO, DEBUG, and TRACE messages being
          // suppressed from going to the server log file
          app.setThreshold(WLLog4jLevel.WARN);
          System.out.println("Set WARNING level on the log file appender");
        } else if (name.equals(AppenderNames.STDOUT_APPENDER)) {
          // Set level to INFO on the stdout filter
          app.setThreshold(WLLog4jLevel.INFO);
          // First clear the existing filters on the appender
          app.clearFilters();
          // Add a filter to block INFO messages from the HTTP subsystem
          app.addFilter(new MyFilter());
        } 
      }
      // Now test the filter
      NonCatalogLogger nc = new NonCatalogLogger("MyFilterTest");
      nc.info("INFO messages will not be published to the file but to stdout");
      nc.warning("WARNINFG messages will be published to the file and stdout"); 

    } catch(LoggerNotAvailableException lex) {
      System.err.println("Log4j logger is not available on this server
    }
  }
  /**
   * Deny messages from the HTTP subsystem of level INFO
   */
  private static class MyFilter extends Filter {
    public int decide(LoggingEvent event) {
      if (event instanceof WLLog4jLogEvent) {
        WLLog4jLogEvent wlsEvent = (WLLog4jLogEvent)event;
        if (wlsEvent.getSubsystem().equals("HTTP")
          && wlsEvent.getSeverity() == Severities.INFO) {
        return DENY;
      }
    }
    return ACCEPT;
  }
 }
}
PK؎pzttPK\EOEBPS/title.htm^ Oracle Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server, 11g Release 1 (10.3.6)

Oracle® Fusion Middleware

Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server

11g Release 1 (10.3.6)

E13739-05

November 2011

This document describes how you use WebLogic Server logging services to monitor server, subsystem, and application events.


Oracle Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server, 11g Release 1 (10.3.6)

E13739-05

Copyright © 2007, 2011, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

PKjKc^PK\EOEBPS/preface.htm/ Preface

Preface

This preface describes the document accessibility features and conventions used in this guide—Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Conventions

The following text conventions are used in this document:

ConventionMeaning
boldfaceBoldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italicItalic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospaceMonospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

PKg'4/PK\EOEBPS/listening.htm{| Subscribing to Messages

5 Subscribing to Messages

When WebLogic Server message catalogs and the NonCatalogLogger generate messages, they distribute their messages to a java.util.logging.Logger object. The Logger object allocates a WLLogRecord object to describe the message and publishes the WLLogRecord to any message handler that has subscribed to the Logger.

The following sections describe creating and subscribing a message handler:

For more information about WebLogic Server loggers and handlers, see The Role of Logger and Handler Objects.

Overview of Message Handlers

WebLogic Server instantiates and subscribes a set of message handlers that receive and print log messages. You can also create your own message handlers and subscribe them to the WebLogic Server Logger objects (see Figure 5-1).

Figure 5-1 Subscribing a Handler

Description of Figure 5-1 follows

For example, if your application runs in a client JVM and you want the application to listen for the messages that your application generates, you can create a handler and subscribe it to the Logger object in the client JVM. If your application receives a log message that signals the failure of a specific subsystem, it can perform actions such as:

  • E-mail the log message to the WebLogic Server administrator.

  • Shut down or restart itself or its subcomponents.


    Note:

    When creating your own message handlers, be careful to avoid executing custom code which runs in the WebLogic Server process before the server initialization has completed and the server has come to a running state. In some cases, custom code can interfere with server services which are being initialized. For example, custom log handlers that make an outbound RMI call which use the PortableRemoteObject before the IIOP server service is initialized, can cause server startup to fail.

Creating and Subscribing a Handler: Main Steps

A handler that you create and subscribe to a Logger object receives all messages that satisfy the level and filter criteria of the logger. Your handler can specify additional level and filter criteria so that it responds only to a specific set of messages that the logger publishes.

To create and subscribe a handler:

  1. Create a handler class that includes the following minimal set of import statements:

    import java.util.logging.Handler;
    import java.util.logging.LogRecord;
    import java.util.logging.ErrorManager;
    import weblogic.logging.WLLogRecord;
    import weblogic.logging.WLLevel;
    import weblogic.logging.WLErrorManager;
    import weblogic.logging.LoggingHelper;
    
  2. In the handler class, extend java.util.logging.Handler.

  3. In the handler class, implement the Handler.publish(LogRecord record) method.

    This method:

    1. Casts the LogRecord objects that it receives as WLLogRecord objects.

    2. Applies any filters that have been set for the handler.

    3. If the WLLogRecord object satisfies the criteria of any filters, the method uses WLLogRecord methods to retrieve data from the messages.

    4. Optionally writes the message data to one or more resources.

  4. In the handler class, implement the Handler.flush and Handler.close methods.

    All handlers that work with resources should implement the flush method so that it flushes any buffered output and the close method so that it closes any open resources.

    When the parent Logger object shuts down, it calls the Handler.close method on all of its handlers. The close method calls the flush method and then executes its own logic.

  5. Create a filter class that specifies which types of messages your Handler object should receive. See Setting a Filter for Loggers and Handlers.

  6. Create a class that invokes one of the following LoggingHelper methods:

    • getClientLogger if the current context is a client JVM.

    • getServerLogger if the current context is a server JVM and you want to attach a handler to the server Logger object.

    • getDomainLogger if the current context is the Administration Server and you want to attach a handler to the domain Logger object.

      LoggingHelper.getDomainLogger() retrieves the Logger object that manages the domain log. You can subscribe a custom handler to this logger and process log messages from all the servers in a single location.

  7. In this class, invoke the Logger.addHandler(Handler myHandler) method.

  8. Optional. Invoke the Logger.setFilter(Filter myFilter) method to set a filter.

Example: Subscribing to Messages in a Server JVM

This example creates a handler that connects to a JDBC data source and issues SQL statements that insert messages into a database table. The example implements the following classes:

Example: Implementing a Handler Class

The example Handler class in Example 5-1 writes messages to a database by doing the following:

  1. Extends java.util.logging.Handler.

  2. Constructs a javax.naming.InitialContext object and invokes the Context.lookup method to look up a data source named myPoolDataSource.

  3. Invokes the javax.sql.DataSource.getConnection method to establish a connection with the data source.

  4. Implements the setErrorManager method, which constructs a java.util.logging.ErrorManager object for this handler.

    If this handler encounters any error, it invokes the error manager's error method. The error method in this example:

    1. Prints an error message to standard error.

    2. Disables the handler by invoking LoggingHelper.getServerLogger().removeHandler(MyJDBCHandler.this).


      Note:

      Instead of defining the ErrorManager class in a separate class file, the example includes the ErrorManager as an anonymous inner class.

    For more information about error managers, see the API documentation for the java.util.logging.ErrorManager class at http://download.oracle.com/javase/6/docs/api/java/util/logging/ErrorManager.html.

  5. Implements the Handler.publish(LogRecord record) method. The method does the following:

    1. Casts each LogRecord object that it receives as a WLLogRecord objects.

    2. Calls an isLoggable method to apply any filters that are set for the handler. The isLoggable method is defined at the end of this handler class.

    3. Uses WLLogRecord methods to retrieve data from the messages.

      For more information about WLLogRecord methods, see the description of the weblogic.logging.WLLogRecord class in the Oracle WebLogic Server API Reference.

    4. Formats the message data as a SQL prepareStatement and executes the database update.

      The schema for the table used in the example is as follows:

    Table 5-1 Schema for Database Table in Handler Example

    NameNull?Type
    MSGID
    

    n/a

    CHAR(25)
    
    LOGLEVEL
    

    n/a

    CHAR(25)
    
    SUBSYSTEM
    

    n/a

    CHAR(50)
    
    MESSAGE
    

    n/a

    CHAR(1024)
    

  6. Invokes a flush method to flush the connection.

  7. Implements the Handler.close method to close the connection with the data source.

    When the parent Logger object shuts down, it calls the Handler.close method, which calls the Handler.flush method before executing its own logic.

Example 5-1 illustrates the steps described in this section.

Example 5-1 Example: Implementing a Handler Class

import java.util.logging.Handler;
import java.util.logging.LogRecord;
import java.util.logging.Filter;
import java.util.logging.ErrorManager;
import weblogic.logging.WLLogRecord;
import weblogic.logging.WLLevel;
import weblogic.logging.WLErrorManager;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.PreparedStatement;
import weblogic.logging.LoggingHelper;
public class MyJDBCHandler extends Handler {
   private Connection con = null;
   private PreparedStatement stmt = null;
   public MyJDBCHandler() throws NamingException, SQLException {
      InitialContext ctx = new InitialContext();
      DataSource ds = (DataSource)ctx.lookup("myPoolDataSource");
      con = ds.getConnection();
      PreparedStatement stmt = con.prepareStatement
      setErrorManager(new ErrorManager() {
          public void error(String msg, Exception ex, int code) {
              System.err.println("Error reported by MyJDBCHandler " 
                                + msg + ex.getMessage());
              //Removing any prior istantiation of this handler
              LoggingHelper.getServerLogger().removeHandler(
                                MyJDBCHandler.this);
          }
      });
   }
   public void publish(LogRecord record) {
      WLLogRecord rec = (WLLogRecord)record;
      if (!isLoggable(rec)) return;
      try {
          ("INSERT INTO myserverLog VALUES (?, ?, ? ,?)");
          stmt.setEscapeProcessing(true);
          stmt.setString(1, rec.getId());
          stmt.setString(2, rec.getLevel().getLocalizedName());
          stmt.setString(3, rec.getLoggerName());
          stmt.setString(4, rec.getMessage());
          stmt.executeUpdate();
          flush();
      } catch(SQLException sqex) {
          reportError("Error publihsing to SQL", sqex,
                            ErrorManager.WRITE_FAILURE);
      }
   }
   public void flush() {
      try {
          con.commit();
      } catch(SQLException sqex) {
          reportError("Error flushing connection of MyJDBCHandler", 
                              sqex, ErrorManager.FLUSH_FAILURE);
      }
   }
    public boolean isLoggable(LogRecord record) {
        Filter filter = getFilter();
        if (filter != null) {
            return filter.isLoggable(record);
        } else {
           return true;
        }
    }
   public void close() {
      try {
          con.close();
      } catch(SQLException sqex) {
           reportError("Error closing connection of MyJDBCHandler", 
                              sqex, ErrorManager.CLOSE_FAILURE);
      }
   }
}

Example: Subscribing to a Logger Class

The example Logger class in Example 5-2 does the following:

  1. Invokes the LoggingHelper.getServerLogger method to retrieve the Logger object.

  2. Invokes the Logger.addHandler(Handler myHandler) method.

  3. Invokes the Logger.getHandlers method to retrieve all handlers of the Logger object.

  4. Iterates through the array until it finds myHandler.

  5. Invokes the Handler.setFilter(Filter myFilter) method.

If you wanted your handler and filter to subscribe to the server's Logger object each time the server starts, you could deploy this class as a WebLogic Server startup class. For information about startup classes, see "Use custom classes to configure servers" in the Oracle WebLogic Server Administration Console Help.

Example 5-2 Example: Subscribing to a Logger Class

import java.util.logging.Logger;
import java.util.logging.Handler;
import java.util.logging.Filter;
import java.util.logging.LogRecord;
import weblogic.logging.LoggingHelper;
import weblogic.logging.FileStreamHandler;
import weblogic.logging.WLLogRecord;
import weblogic.logging.WLLevel;
import java.rmi.RemoteException;
import weblogic.jndi.Environment;
import javax.naming.Context;
public class LogConfigImpl {
    public void configureLogger() throws RemoteException {
        Logger logger = LoggingHelper.getServerLogger();
        try {
            Handler h = null;
            h = new MyJDBCHandler();
            logger.addHandler(h);
            h.setFilter(new MyFilter());
        } catch(Exception nmex) {
            System.err.println("Error adding MyJDBCHandler to logger " 
                               + nmex.getMessage());
            logger.removeHandler(h);
        } 
    }
    public static void main(String[] argv) throws Exception {
        LogConfigImpl impl = new LogConfigImpl();
        impl.configureLogger();
    }
}

Example: Implementing a Log4j Appender Class

The example Appender class in Example 5-3 connects to a JDBC data source and issues SQL statements that insert messages into a database table:

  1. Extends AppenderSkelton.

  2. Constructs a javax.naming.InitialContext object and invokes the Context.lookup method to look up a data source named MyDataSource.

  3. Invokes the javax.sql.DataSource.getConnection method to establish a connection with the data source.

  4. Implements the append(LoggingEvent event) method. The method does the following:

    1. Casts each LoggingEvent object that it receives as a WLLog4jLogEvent.

    2. Uses WLLog4jLogEvent methods to retrieve data from the messages.

      For more information about WLLog4jLogEvent methods, see the description of the weblogic.logging.log4j.WLLog4jLogEvent class in the Oracle WebLogic Server API Reference.

    3. Creates a SQL prepareStatement and executes the database update whenever a logging event arrives.

      The schema for the table used in the example is as follows:

    Table 5-2 Schema for Database Table in Log4j Appender Example

    NameNull?Type
    SERVERNAME
    

    n/a

    CHAR(30)
    
    MSGID
    

    n/a

    CHAR(20)
    
    SEVERITYLEVEL
    

    n/a

    CHAR(20)
    
    LOGGERNAME
    

    n/a

    CHAR(100)
    
    MESSAGE
    

    n/a

    VARCHAR(2048)
    
    TIMESTAMP 
    

    n/a

    LONG
    

  5. Implements the close method to close the connection with the data source.

Example 5-3 illustrates the steps described in this section.

Example 5-3 Example: Log4j Appender Examples Startup

package weblogic.logging.examples;
import java.util.Enumeration;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.LoggingEvent;
import weblogic.logging.LoggerNotAvailableException;
import weblogic.logging.NonCatalogLogger;
import weblogic.logging.Severities;
import weblogic.logging.log4j.AppenderNames;
import weblogic.logging.log4j.Log4jLoggingHelper;
import weblogic.logging.log4j.WLLog4jLevel;
import weblogic.logging.log4j.WLLog4jLogEvent;
import org.apache.log4j.jdbc.JDBCAppender;
import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.InitialContext;
import weblogic.logging.log4j.WLLog4jLogEvent;
import weblogic.logging.Severities;
/**
 * This class sets up a Log4j Appender as a listener to the
 * Server Logger for log events.
 */
public class Log4jAppenderExampleStartup {
  public static void main(String[] args) {
    try {
      System.out.println("Invoked the appender example startup class");
      Logger serverLogger = Log4jLoggingHelper.getLog4jServerLogger();
      // Configure the JDBC appender
      MyJDBCAppender jdbcAppender = new MyJDBCAppender();
      // Now add the JDBC appender to the server logger
      serverLogger.addAppender(jdbcAppender);
      // Now test the filter
      NonCatalogLogger nc = new NonCatalogLogger("MyAppenderTest"); 
      nc.info("Test INFO message");
      nc.warning("Test WARNING message"); 
    } catch(Exception ex) {
      System.err.println("Init failure " + ex.getMessage());
      ex.printStackTrace();
    }
  }
  private static class MyJDBCAppender extends AppenderSkeleton {
    private Connection connection;
    private java.sql.PreparedStatement stmt;
    public MyJDBCAppender() throws javax.naming.NamingException, SQLException {
      InitialContext ctx = new InitialContext();
      javax.sql.DataSource ds 
          = (javax.sql.DataSource) ctx.lookup ("MyDataSource");
      connection = ds.getConnection();
      // Table schema creation SQL command
      // Create table SERVER_LOG (server_name char(30),msg_id char(20), 
      // severity_level char(20),logger_name char(100),message varchar(2048),
      // timestamp long);
      stmt = connection.prepareStatement("INSERT INTO SERVER_LOG VALUES (?, ?, ?, ?, ?, ?)");
            stmt.setEscapeProcessing(true);
            connection.setAutoCommit(true);
        }
        // Override execute method
        public void append(LoggingEvent event) {
        WLLog4jLogEvent wlsEvent = (WLLog4jLogEvent) event;
        try {
          stmt.setString(1, wlsEvent.getServerName());
          stmt.setString(2, wlsEvent.getId());
          stmt.setString(3, Severities.severityNumToString(wlsEvent.getSeverity()));
          stmt.setString(4, wlsEvent.getSubsystem());
          stmt.setString(5, wlsEvent.getMessage().toString());
          stmt.setLong(6, wlsEvent.getTimestamp());
          stmt.executeUpdate(); 
        } catch (SQLException e) {
          System.err.println(e.toString());
        }
      }
      public boolean requiresLayout() {
        return false;
      }
      public void close() {
        try {
          stmt.close();
          connection.close();
        } catch(SQLException sqlex) {
          System.err.println("Error closing JDBC appender");
          sqlex.printStackTrace();
        }
      }
    }
  }

Comparison of Java Logging Handlers with JMX Listeners

Prior to WebLogic Server 8.1, the only technique for receiving messages from the WebLogic logging services was to create a Java Management Extensions (JMX) listener and register it with a LogBroadcasterRuntimeMBean. With the release of WebLogic Server 8.1, you can also use Java Logging handlers to receive (subscribe to) log messages.

While both techniques - Java Logging handlers and JMX listeners - provide similar results, the Java Logging APIs include a Formatter class that a Handler object can use to format the messages that it receives. JMX does not offer similar APIs for formatting messages. For more information about formatters, see the API documentation for the Formatter class at http://download.oracle.com/javase/6/docs/api/java/util/logging/Formatter.html.

In addition, the Java Logging Handler APIs are easier to use and require fewer levels of indirection than JMX APIs. For example, the following lines of code retrieve a Java Logging Logger object and subscribe a handler to it:

Logger logger = LoggingHelper.getServerLogger();
Handler h = null;
h = new MyJDBCHandler();
logger.addHandler(h)

To achieve a similar result by registering a JMX listener, you must use lines of code similar to Example 5-4. The code looks up the MBeanHome interface, looks up the RemoteMBeanServer interface, looks up the LogBroadcasterRuntimeMBean, and then registers the listener.

Optimally, you would use Java Logging handlers to subscribe to log messages on your local machine and JMX listeners to receive log messages from a remote machine. If you are already using JMX for monitoring and you simply want to listen for log messages, not to change their formatting or reroute them to some other output, use JMX listeners. Otherwise, use the Java Logging handlers.

Example 5-4 Registering a JMX Listener

MBeanHome home = null;
RemoteMBeanServer rmbs = null;
//domain variables
String url = "t3://localhost:7001";
String serverName = "Server1";
String username = "weblogic";
String password = "weblogic";
//Using MBeanHome to get MBeanServer.
try {
    Environment env = new Environment();
    env.setProviderUrl(url);
    env.setSecurityPrincipal(username);
    env.setSecurityCredentials(password);
    Context ctx = env.getInitialContext();
    //Getting the Administration MBeanHome.
    home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    System.out.println("Got the Admin MBeanHome: " + home );
    rmbs = home.getMBeanServer();
} catch (Exception e) {
    System.out.println("Caught exception: " + e);
}
try {
    //Instantiating your listener class.
    MyListener listener = new MyListener();
    MyFilter filter = new MyFilter();
    //Construct the WebLogicObjectName of the server's
    //log broadcaster.
    WebLogicObjectName logBCOname = new
             WebLogicObjectName("TheLogBroadcaster",
           "LogBroadcasterRuntime", domainName, serverName);
    //Passing the name of the MBean and your listener class to the
    //addNotificationListener method of MBeanServer.
    rmbs.addNotificationListener(logBCOname, listener, filter, null);
    } catch(Exception e) {
        System.out.println("Exception: " + e);
    }
}
PKYQ{{PK\EOEBPS/cover.htm  Cover

Oracle Corporation

PK@t` PK\E OEBPS/toc.htmV Table of Contents

Contents

Preface

1 Introduction and Roadmap

2 Understanding WebLogic Logging Services

3 Configuring WebLogic Logging Services

4 Filtering WebLogic Server Log Messages

5 Subscribing to Messages

PK5ޮPK \Eoa,mimetypePK\EfKg:iTunesMetadata.plistPK\EYu META-INF/container.xmlPK\EKV7OEBPS/logging_services.htmPK\El-OJ]OEBPS/dcommon/oracle.gifPK\E]QٺnnOEBPS/dcommon/oracle-logo.jpgPK\E0h\OEBPS/dcommon/cpyr.htmPK\Er.hcnOEBPS/dcommon/blafdoc.cssPK\Eo"nR M OEBPS/dcommon/doccd_epub.jsPK\E EOEBPS/toc.ncxPK\E OEBPS/content.opfPK\E" 0OEBPS/config_logs.htmPK\E`OEBPS/intro.htmPK\EX4HjCjDOEBPS/img/log_viewer2.gifPK\Eڲ[(#OEBPS/img/handler.gifPK\E# >OEBPS/img/contexts.gifPK\E+&OEBPS/img/domain-logs.gifPK\Ea0=OEBPS/img/process.gifPK\E؎pzttNROEBPS/filtering.htmPK\EjKc^!OEBPS/title.htmPK\Eg'4/OEBPS/preface.htmPK\EYQ{{4OEBPS/listening.htmPK\E@t` fOEBPS/cover.htmPK\E5ޮ JiOEBPS/toc.htmPK13