Skip Headers
Oracle® Beehive Administrator's Guide
Release 1 (1.5)

Part Number E14836-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

18 Oracle Beehive Logging and Diagnosability

This module contains the following topics:

Introduction

This module contains information about configuring logging options; monitoring and maintaining logs; and methodologies relating to troubleshooting and diagnosing issues for Oracle Beehive.

Complimentary information about error codes is available in the "Oracle Beehive Error Codes" module of the Oracle Beehive Administrator's Reference Guide

Logging

This section describes Oracle Beehive logging, and includes the following topics:

Logging Architecture

Oracle Beehive logs are located in the following directory:

$ORACLE_HOME/beehive/logs

A variety of directories and files will appear within the $ORACLE_HOME/beehive/logs directory. The folders represent different functional areas of Oracle Beehive. The sub-directories and files that are in your logs directory depend on the types of operations performed with your Oracle Beehive deployment.

Once a beectl command has been used, for example, a beectl sub-directory will appear under $ORACLE_HOME/beehive/logs directory. Within the beectl directory, directories represented using a date MM.DD.YYYY format will be created. Each MM.DD.YYYY directory represents the day on which the information was logged. A log file denoting the beectl command that was used will appear under the dated directory.

Within the $ORACLE_HOME/beehive/logs/oc4j directory, sub-directories are named after managed components and will typically include a log.txt file and a series of files named log.txt.#. The # in log.txt.# represents an archived version of the log file. The most recent log file is always log.txt.

For more information about log archiving options refer to the "Managing Logs" section.

Figure 18-1 outlines what you might typically expect to see in the $ORACLE_HOME/beehive/logs directory.

Note:

The directory structure on your Oracle Beehive deployment may have additional or fewer files and directories.

Figure 18-1 Oracle Beehive Log Directory Structure

The Oracle Beehive logs directory structure
Description of "Figure 18-1 Oracle Beehive Log Directory Structure"

Note:

The $ORACLE_HOME/beehive/logs/config/clone directory will only exist in the log directory structure in cloned environments.

Understanding Log Entries

This section contains information about log entries, including identifying the source of a message and its importance relative to the overall health of Oracle Beehive.

This section contains the following topics:

For a complete listing of Oracle Beehive error codes refer to "Oracle Beehive Error Codes" in Oracle Beehive Administrator's Reference Guide

Error Code Severities

Log entries contain information relating to a system action. The entries are not limited to highlighting critical errors in Oracle Beehive; they also serve to inform administrators of events that have occurred within the system.

Although log levels are set in a Java log level format, the severity level of messages that appear in Oracle Beehive logs are based on ODL message type log levels. For information about mappings of Java log level to ODL message type log levels refer to "Logging in OC4J" in the Oracle Containers for J2EE Configuration and Administration Guide.

Table 18-1 Oracle Beehive Log Level Severities

Type Description

INTERNAL_ERROR

Oracle Beehive has experienced an error for internal or unexpected reasons. Oracle recommends reporting these errors to Oracle Support.

ERROR

Some problem that requires attention from the system administrator.

WARNING

Indicates that an action occurred or a condition was discovered that should be reviewed and may require action. This type of message may lead to a message of type ERROR.

NOTIFICATION

Reports a normal action or event. Could be a user operation, such as "login completed" or automatic operation such as a log file switch.

TRACE

A trace or debug message.


Error Message Examples

This section contains two examples of error messages, and explains the significance of the fields in each message.

Example 18-1 Example BEECORE Log File Error Message

[2008-03-21T01:50:12.417-07:00] [OJDL] [NOTIFICATION:16] [] [oracle.core.ojdl.FileLogWriter] [org: Acme] [host: myhost.domain.com] [nwaddr: 111.11.111.111] [tid: WorkExecutorWorkerThread-2] [userId: oracle] Deleted log file: log.txt.30, size = 10485474 bytes

The log entry in Example 18-2 has 11 fields. It is important to note that not all error messages have the same number of fields, nor is the information in the same order. As a guideline, Table 18-3 explains the sequence of errors that appear in Example 18-2.

Table 18-2 Explanation of Error Message Fields in Example 18-2

Number Name Description

1

Date and time

Specifies the date and time, in ISO standard format, at which the error message was logged.

2

Source

Indicates the source of the message.

3

Log level

Indicates the log level of error message. For a complete list of log levels and their significance, refer to Table 18-1, "Oracle Beehive Log Level Severities".

4

Empty field

This field has no significance, and is always empty.

5

Module or class

Specifies the module or class that raised the error.

6

Organization

Indicates the organization.

7

Host

Indicates the host on which the error occurred.

8

Network address

Indicates the network address of the host on which the error occurred.

9

Thread ID

Specifies the thread ID.

10

User

Specifies the user ID performing the action.

11

Description

A description of the error message. This message will often include Oracle Beehive error code IDs, suspected causes and recommended actions.

For a list of Oracle Beehive error code IDs, refer to "Oracle Beehive Error Codes" in Oracle Beehive Administrator's Reference Guide


Example 18-2 Example BEEAPP Log File Error Message

[2008-03-25T15:27:15.758-07:00] [beehive] [WARNING] []
[tm.service.timemanagement.task.CompositeDetectChangedTask] [tid: 34] 
[ecid: 140.87.85.31:24335:1206484035703:96,0] 
[bee_compid: 6d50fc8f-42c4-4140-802e-889cac3024cb] 
[bee_compname: TimeManagementService] The Time Management Detect Composite
Changed Task received an error while processing composite information. The
failed operation will be retried. This may be an expected transient error unless
it recurs while the Beehive Database and Services are up and working.

The log entry in Example 18-2 has nine fields. It is important to note that not all error messages have the same number of fields, nor is the information in the same order. As a guideline, Table 18-3 explains the sequence of errors that appear in Example 18-2.

Table 18-3 Explanation of Error Message Fields in Example 18-2

Number Name Description

1

Date and time

Specifies the date and time, in ISO standard format, at which the error message was logged.

2

Source

Indicates the source of the message.

3

Log level

Indicates the log level of error message. For a complete list of log levels and their significance, refer to Table 18-1, "Oracle Beehive Log Level Severities".

4

Empty field

This field has no significance, and is always empty.

5

Thread ID

Specifies the thread ID.

6

Error code fingerprint

Specifes the fingerprint ID of the error message.

7

Oracle Beehive component ID

Specifies the identifier of the service in which the error message was generated.

8

Oracle Beehive component name

Specifies the name of the service in which the error message was generated.

9

Description

A description of the error message. This message will often include Oracle Beehive error code IDs, suspected causes and recommended actions.

For a list of Oracle Beehive error code IDs, refer to "Oracle Beehive Error Codes" in Oracle Beehive Administrator's Reference Guide


ChangingLog Levels

This section includes information about how to change log levels, and the circumstances under which they should be changed.

Log Levels

Table 18-4 outlines valid arguments when setting a log level in Oracle Beehive. The values that appear in the left column should be used when setting the log level using beectl modify_property command, whereas the value that appears in the right column represents the value that will appear in Oracle Beehive logs.

Table 18-4 Log Level Values Set vs. Values that Appear in the Oracle Beehive Logs

Value Used to Set Using beectl Value that Appears in the Log

NULL

 

SEVERE

ERROR:1

WARNING

WARNING:1

INFO

NOTIFICATION:1

CONFIG

NOTIFICATION:16

FINE

TRACE:1

FINER

TRACE:16

FINEST

TRACE:32


Listing Oracle Beehive Logging Properties

Oracle Beehive logging allows you to configure many logging properties to meet the needs of your deployment.

Use this command to list configurable Oracle Beehive logging properties:

beectl> list_properties --component _Current_site:LoggingProperties

A table similar to the following will be returned:

------------------+----------------------------------------------------------
Property name     | Property value
------------------+----------------------------------------------------------
Alias             |               
------------------+----------------------------------------------------------
BaseLogLevel      | WARNING       
------------------+----------------------------------------------------------
MaxFileSize       | 10485760      
------------------+----------------------------------------------------------
MaxLogSize        | 104857600     
------------------+----------------------------------------------------------
ModuleLogLevel    |               
------------------+----------------------------------------------------------
RotationFrequency | DAILY         
-------------------+---------------------------------------------------------
6 Record(s) displayed.

Changing Log Levels Globally

Follow these steps to change the log level for all Oracle Beehive services:

  1. Determine the current value of the BaseLogLevel property. For instructions about listing current properties, refer to "Listing Oracle Beehive Logging Properties".

  2. Modify the BaseLogLevel property to the desired value using the modify_property command:

    beectl> modify_property --component _CURRENT_site:LoggingProperties --name BaseLogLevel --value <log_level>
    

    Where <log_level> represents the log level that you want to assign to Oracle Beehive. For a list of valid arguments refer to Table 18-4.

    Note:

    Oracle does not recommend setting global logging levels to FINE, FINER, or FINEST. To set a specific module to FINE, FINER, or FINEST, refer to "Changing Log Levels for Specific Modules".
  3. Activate the configuration changes:

    beectl> activate_configuration
    

Changing Log Levels for Specific Modules

When troubleshooting, you may want to set a higher log level, such as FINE, FINER, or FINEST. These log levels should not be applied to Oracle Beehive globally due to the volume of log messages generated. Administrators can set a higher level of logging on a per module basis to assist in narrowing down a particular issue.

Follow these steps to change a log level for a particular module:

  1. Determine the module or class for which you want to increase the log level. This information can be found in the log files.

    Typically, the module or class will be a string of characters separated by periods. In the following excerpt from the $ORACLE_HOME/beehive/logs/BEEAPP/log.txt, the FRAMEwork.service.OnsReceiver class is triggering the log message:

    [2008-03-25T15:27:05.581-07:00] [beehive] [WARNING] [] [FRAMEwork.service.OnsReceiver] [tid: 11] [ecid: 140.87.85.31:24335:1206483955043:3,0] Status of app 'cms-listener' cahnged from 'PRESUMED_UNAVAILABLE' to 'INITIALIZING'
    
  2. Modify the module's log level, using the following command:

    beectl> modify_property --component _Current_Site:LoggingProperties --name ModuleLogLevel --value oracle.ocs.<module>:<log_level>
    

    Where <module> represents the module determined in Step 1, and <log_level> represents the log level that you want to assign to the Oracle Beehive module. For a list of valid arguments refer to Table 18-4.

    Note:

    When specifying the argument for the --value option, the module must be prefixed with oracle.ocs.
  3. Activate the configuration changes:

    beectl> activate_configuration
    

You can use the beectl delete_property command to remove the map of ModuleLogLevel properties for a component:

beectl> delete_property --component _CURRENT_SITE:LoggingProperties --name ModuleLogLevel

This command clears the property, setting it to null.

You can also append a value to the map, keeping the existing entries and adding new ones:

beectl> append_value --component _CURRENT_SITE:LoggingProperties --name ModuleLogLevel --value "oracle.ocs.mail.service:CONFIG"

After making changes to any property, activate the configuration:

beectl> activate_configuration

Managing Logs

This section includes information about managing logs, including; controlling log archiving, and managing the size of logs and log directories.

Oracle Beehive log files are archived regularly based on the size of a log file, or the size of the directory. This section includes the following topics:

Archiving Logs by File Size

By default all Oracle Beehive log files are archived when the file size has reached 10485760 bytes.

To increase or decrease this value, for all Oracle Beehive log files:

  1. Modify the argument of the MaxFileSize property using the following command:

    beectl> modify_property _CURRENT_site:LoggingProperties --name MaxFileSize --value <log_file_size>
    

    Where <log_file_size> represents the size of file, in bytes, at which a log file should be archived.

  2. Activate the configuration changes:

    beectl> activate_configuration
    

Archiving Logs by Directory Size

By default the $ORACLE_HOME/beehive/logs directory is archived when the directory size has reached 104857600 bytes.

To increase or decrease this value:

  1. Modify the argument of the MaxLogSize property using the following command:

    beectl> modify_property _CURRENT_site:LoggingProperties --name MaxLogSize --value <log_directory_size>
    

    Where <log_directory_size> represents the size, in bytes, at which $ORACLE_HOME/beehive/logs directory should be archived.

  2. Activate the configuration changes:

    beectl> activate_configuration
    

Searching Through Logs

This section includes information about searching through logs, including examples of the most common options you may want to use when searching through logs.

When an unexpected situation arises and the source of an error message has been determined, you may want to query logs for specific errors or strings. To accomplish this task, use the beectl export_filesystem_logs command.

The default number of search results returned when using the export_filesystem_logs command is 50. You can increase the number of results using the --maximum_results option.

Example 18-3 Searching All Log Records in the error_code Framework Module

beectl> export_filesystem_logs --search_string "(MODULE_ID='cspi.OcsExceptionMetadata')" --display_source true

In Example 18-3 the export_filesystem_logs command is used to search for the string "(MODULE_ID='cspi.OcsExceptionMetadata')" in all log records in the error_code Framework Module. The --display_source option instructs the command to return the file in which the record appears.

Example 18-4 Limiting the Search to BEEAPP Logs

beectl> export_filesystem_logs --search_string "(MODULE_ID='cspi.OcsExceptionMetadata')" --file_name_filter oc4j/beeapp --display_source true

In Example 18-4 the export_filesystem_logs command is used to search for the string "(MODULE_ID='cspi.OcsExceptionMetadata')". The --file_name_filter indicates that the search should be performed exclusively in the $ORACLE_HOME/beehive/logs/oc4j/BEEAPP directory. The --display_source option instructs the command to return the file in which the record appears.

Example 18-5 Sending the Output of a Search Result to a File

beectl> export_filesystem_logs --search_string "(MODULE_ID='cspi.OcsExceptionMetadata')" --display_source true -target_output /tmp/temp.txt

In Example 18-5 the export_filesystem_logs command is used to search for the string "(MODULE_ID='cspi.OcsExceptionMetadata')" in all log records in the error_code Framework Module. The --display_source option instructs the command to return the file in which the record appears. The --target_output option indicates that the search results should be output a temp.txt file in the /tmp directory.

For a list of all options available when searching through logs using the export_filesystem_logs command, refer to "export_filesystem_logs" in the Oracle Beehive Administrator's Reference Guide.