Understanding the WebLogic Server Logs


From a WebLogic Server administration perspective, you should become familiar with two types of log files: the domainwide and local WebLogic Server log files. These log files not only provide information on the condition and the events that are occurring within your WebLogic Server, but they also serve as a vital resource for performing root cause analysis in the advent of any problems that may occur with the operation of your WebLogic Server or deployed applications.

The default name and location of a WebLogic Server's local log file is server \ server .log , where server is the name of the WebLogic Server and the log file path is relative to the root directory from which the respective WebLogic Server is started. The default name of the domainwide log file is wl-domain and is located in the root directory from which the administration server is started.

The administration server has a local as well as a domainwide log file associated with it.

The logging subsystem of WebLogic Server is responsible for the event logging operation, and it outputs messages to both the local and domainwide log files using a consistent set of attributes, as shown in Table 24.5.

Table 24.5. The Logging Attributes of the WebLogic Server Log Files

Attribute

Description

Timestamp

The time and date when the message was created.

Severity

The degree of criticality of the event or condition as follows :

 

INFO

 

Specifies normal operation.

 

WARNING

 

Specifies suspicious activity or configuration that should not impact the normal operation of WebLogic Server.

 

ERROR

 

Specifies an error has occurred in WebLogic Server or application with limited degradation of operation.

 

NOTICE

 

Specifies a monitoring message with the same severity level as INFO and WARNING.

 

CRITICAL

 

Specifies an error has occurred with permanent loss or degradation of service.

 

ALERT

 

Specifies a specific subsystem has failed and immediate administrative attention is required to recover the subsystem.

 

EMERGENCY

 

Specifies WebLogic Server is in a Failed state and must be shut down.

Subsystem

The WebLogic Server subsystem that was the source of the message.

Message Source

The origin of the messagefor example, Server Name, Machine Name, Thread ID, or Transaction ID.

User ID

The user from the security context that caused the message to be created.

Message ID

A six-digit identifier used to uniquely identify the message.

Message Description

The description of the related event.

The following sections discuss how you can use the Administration Console to modify the logging operations and output related to the local and domainwide log files, respectively.

Modifying the Logging Behavior of the Local Log File

The logging characteristics for a local log file can be modified on a per WebLogic Server basis, using the following tabs in the Administration Console:

  • Logging, General tab

  • Logging, Rotation tab

You can also enable WebLogic Server to create separate local HTTP, JDBC, and JTA subsystem log files.

The following sections describe each of these tabs.

The General Tab

From the General tab, as shown in Figure 24.28, you can specify the following attribute values:

Figure 24.28. A WebLogic Server's Logging, General tab.

graphics/24fig28.jpg

  • File Name Specifies the location and name of the WebLogic Server's Local log file.

    Caution

    If you modify the local log filename, you will need to restart WebLogic Server to enable the logging activities to occur to the new file.


  • Log to Stdout Specifies whether logging information should be sent to standard output as well as the local log file. This is enabled by default.

  • Debug to Stdout Specifies whether debug messages should be sent to the standard output. This is disabled by default.

  • Stdout Severity Threshold Specifies the severity level of the messages sent to the standard output, if it has been enabled.

The Rotation Tab

By default, WebLogic Server's local log file will grow in size indefinitely. To keep the log file to a manageable and viewable size, you can rotate the log file based on its size or on a specific time interval. Upon rotation, the current log file is renamed by adding a sequence number suffix, and a new local log file is created, which will store all subsequent WebLogic Server messages. For example, if you have a log file named AdminServer.log , after the first rotation, it will be renamed AdminServer.log00001 .

You can specify the rotation criteria for your local log file using the Rotation tab, as shown in Figure 24.29.

Figure 24.29. WebLogic Server's Logging, Rotation tab.

graphics/24fig29.jpg

From the Rotation tab, you can specify the following:

  • Rotation Type The criteria to rotate the local log file, which are None, By Size, and By Time. If you select None, your local log file will not rotate.

  • File Min Size If you selected to rotate the log file using the By Size criteria, you will need to specify the maximum size of the log file upon which it is rotated .

  • Rotation Time If you selected to rotate the log file using the By Time criteria, you will need to specify the starting time for the time-based rotation to occur. You can create a recurring or nonrecurring start time using the MM-dd-yyyy-k:mm:ss date-time format, where

    • MM Month

    • dd Day in the month

    • yyyy Year

    • k Hour in the day (124)

    • mm Minute in the hour

    • ss Second in the minute

    For example, if you want to start the time-based rotation in your current day at 12:55 p.m., you can just enter 12:55 .

    Caution

    Log rotation by time is based on the time stamp of the local log file. For this reason, you should not modify the log file, thus causing the time stamp to change.


  • File Time Span If you selected time-based rotation, you can specify the number of hours between each log file rotation. The minimum is one hour.

  • Number of Files Limited and File Count If you selected either the size or time-based rotation, enabling this option specifies the File Count number of rotated log files to create, before the oldest log file is overwritten.

You do not need to restart WebLogic Server after you specify your rotation criteria.

Modifying the Logging Behavior of the Domainwide Log File

You can modify the name and rotation criteria for the default domainwide log file using the domain's Configuration, Logging tab in the Administration Console, as shown in Figure 24.30.

Figure 24.30. Modifying the default domainwide log file attributes.

graphics/24fig30.gif

Even though messages of varying severity levels are broadcast by managed servers within a domain via their own JMX facilities, the administration server's Message Listener, by default, filters out messages with the ERROR severity level and higher and writes them to the domainwide log file. Hence, the domainwide log provides only an overall summary of the status of the domain.

DEBUG and stack trace messages are never broadcast from managed servers to the administration server.

However, if you have a service-level agreement that warrants the need to monitor domainwide messages with a different minimum severity level, it is very impractical to try to perform this task by accessing the local WebLogic Server log files, especially if you have a large and distributed WebLogic domain.

When you require comprehensive domainwide log monitoring, you can override this default filter for specific WebLogic Servers in your domain by creating a domain log filter, which can be customized to receive messages based on different criteria.

The following steps describe how to create a domain log filter using the Administration Console:

  1. Click the Domain Log Filters node in the left pane.

  2. From the right pane, click Configure a New Domain Log Filter.

  3. In the Configuration tab, as shown in Figure 24.31, enter the following information:

    Figure 24.31. Creating a domain log filter.

    graphics/24fig31.jpg

    • Name Enter a name that will uniquely identify the domain filterfor example, dfmServer , which can be assigned to mServer.

    • Severity Level Enter the minimum severity level of the messages to be written to the domainwide log file.

    • User Ids Enter the user IDs of the users associated with the broadcast messages. If you do not select any users, all users from the security context will be logged.

    • Subsystems Select the subsystems from which you want to receive messages. If you do not select any subsystems, messages from all subsystems will be logged.

  4. Click Create to create the domain log filter.

  5. From the Targets tab, as shown in Figure 24.32, select the WebLogic Servers the filter will apply to and click Apply.

    Figure 24.32. Assigning a domain log filter to WebLogic Server.

    graphics/24fig32.jpg

Note

Only one domain log filter can be assigned to a WebLogic Server.


You can also enable and reselect the domain log filter for a specific WebLogic Server using the Logging, Domain tab in the Administration Console for a specific WebLogic Server, as shown in Figure 24.33.

Figure 24.33. Enabling and selecting a domain log filter for WebLogic Server.

graphics/24fig33.jpg



BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net