Skip Headers

Oracle Application Server 10g Administrator's Guide
10g (9.0.4)

Part Number B10376-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

4
Managing Log Files

Oracle Application Server components generate log files containing messages that record all types of events, including startup and shutdown information, errors, warning messages, access information on HTTP requests, and additional information. This chapter describes how to view and manage log files to assist in monitoring system activity and in diagnosing system problems.

It contains the following topics:

4.1 Introduction to Oracle Application Server Logging

Oracle Enterprise Manager Application Server Control (Application Server Control) lets you list and search log files across Oracle Application Server components. You can view log files from Application Server Control pages or download a log file to your local client and view the log files using another tool.

This section covers the following topics:

4.1.1 Understanding Log File Data and Naming

Several Oracle Application Server components use Oracle Diagnostic Logging (ODL). Using ODL, log file naming and the format of the contents of log files conforms to an Oracle standard and the diagnostic messages are written in XML. Some Oracle Application Server components do not use ODL, and write their diagnostic messages using a component specific text format. Regardless of the format of the messages that are stored in log files, ODL or text based, you can view log files using Application Server Control, or you can download log files to your local client and view them using another tool (for example a text editor, or another file viewing utility).

This section covers the following topics:

4.1.1.1 ODL Message Formatting and ODL Log File Naming

When Oracle Application Server components run and produce ODL messages, the messages are written to diagnostic log files using XML format. Each ODL message includes a HEADER element containing fields with information about the message, optionally a CORRELATION_DATA element containing information to assist in correlating messages across components, and a PAYLOAD element containing the message text, including optional arguments and associated values.

Using ODL, Oracle Application Server components write diagnostic log files to a logging directory and determine the names for logging directories using a component specific naming convention.

See Also:

4.1.1.2 Log File Messages by Component

Table 4-1 lists the supported message formats for each Oracle Application Server component. Several components optionally support ODL format, where ODL is not the default format.

Table 4-1  Diagnostic Message Format By Component
Component Default Format ODL Support Location

BC4J

ODL

Yes

$ORACLE_HOME/BC4J/logs/OC4J_Name

DCM

ODL

Yes

$ORACLE_HOME/dcm/logs

Discoverer

Text

No

$ORACLE_HOME/discoverer/logs

The Discoverer Viewer is an OC4J application. The log file is named application.log and is found under: $ORACLE_HOME/j2ee/OC4J_BI_FORMS

Enterprise Manager

Text

No

$ORACLE_HOME/sysman/log

Forms

Text

No

$ORACLE_HOME/j2ee/OC4J_BI_FORMS/application-deployments/forms90app/island/application.log

HTTP_Server

Text

Yes

$ORACLE_HOME/Apache/Apache/logs/error_log.time

Log Loader

ODL

Yes

$ORACLE_HOME/diagnostics/logs

OC4J instance_name

Text

Yes

$ORACLE_HOME/j2ee/instance_name/log

$ORACLE_HOME/j2ee/instance_name/application-deployments/application_name/application.log

OID

Text

No

$ORACLE_HOME/ldap/log

OPMN

Text

No

$ORACLE_HOME/opmn/logs

$ORACLE_HOME/opmn/logs/component_type~...

Port Tunneling

Text

No

$ORACLE_HOME/iaspt/logs

Reports Server

Text

No

$ORACLE_HOME/reports/logs

TopLink

Text

No

The log file location is specified with the log path configuration option in the TopLink installation directory, as: config/toplink.xml

Universal Installer

Text

No

$ORACLE_HOME/cfgtoollogs/

Web Cache

Text

No

$ORACLE_HOME/webcache/logs

Wireless

Text

Yes

$ORACLE_HOME/wireless/logs

4.1.2 Using A Log Repository

Application Server Control supports viewing diagnostic messages from a Log Repository (a Log Repository stores error logs, but does not store access logs). A Log Repository contains diagnostic messages collected from multiple log files across components. The Oracle Application Server Log Loader component initializes and updates the data in a Log Repository. After the Log Loader starts, at regular intervals it stores information from diagnostic log files to the Log Repository.

Using a Log Repository consolidates Oracle Application Server log file data; this allows you to use Application Server Control to easily search and view log file data generated by multiple components. Using a Log Repository can speed up the diagnostic process and reduce the resources required to support Oracle Application Server.


Note:

By default, the Log Loader is not started. Use Application Server Control to start Log Loader.


See Also:

Section 4.5, "Using Oracle Application Server Log Loader"

4.1.3 Configuring Component Logging Options

Administrators configure logging options to manage and limit the logging information that Oracle Application Server components generate and save.


Note:

Application Server Control does not directly support configuring logging options. In many cases, to configure component logging options you need to use the Application Server Control Advanced Server Properties page to edit the values in configuration files.


The logging configuration options include:

4.2 Listing and Viewing Log Files With Enterprise Manager

Use Oracle Enterprise Manager Application Server Control to list log files by selecting the Logs link on the Application Server Control. This brings up the View Logs page.

See Also:

Section 4.6.1, "Using the printlogs Tool to View Log Messages" for information on a command-line tool for viewing log files

This section covers the following:

4.2.1 Listing Log Files for All Components

Selecting the Logs link on the Application Server Control shows the View Logs page. To list the log files, starting on the View Logs page perform the following steps:

  1. Select the Move All button to move all available components to the Selected Components box.

  2. Select the Search button to list the log files for the selected components.

  3. After the search returns, the Results section shows log file information such as the name of the component associated with a log file and a link to the log file.

Figure 4-1 shows the Application Server Control View Logs page after a search.

Figure 4-1 Enterprise Manager View Logs Search Results

Text description of logview2.gif follows.

Text description of the illustration logview2.gif

4.2.2 Listing Log Files for Selected Components

Using Application Server Control, selecting the Logs link shows the View Logs page. To list selected components log files, starting on the View Logs page perform the following steps:

  1. Select the components whose log files you want to view from the Available Components box and use the Move button to move the selected component to the Selected Components box (some browsers support double clicking to move components between the boxes).

  2. Select the Search button to list the log files for the selected components.

  3. After a search returns, the Results section shows log file information such as the name of the component associated with a log file and a link to the file.

Figure 4-1 shows the View Logs page Results after a search.

4.2.3 Listing Log Files from Oracle Application Server Components Pages

After you select a system component link on the Application Server Control main page, you can view the component log files by selecting the Logs link. When you select this link, Application Server Control shows the View Logs page and runs a search for the component's log files. Thus, clicking on the Logs link for pages associated with a component runs a log file search for that component. You can then view the log files by selecting the Log File links shown in the Results section.

When you select the Logs link from a component page, the log file pages include a Return to link at the bottom of each page. The Return to link returns you to the component page from which you selected the Logs link.

4.2.4 Using Log Files Advanced Search

After selecting the Logs link on an Application Server Control page, the View Logs page is shown. Starting on the View Logs page, selecting the Advanced Search button shows the View Logs Advanced Search page. The Advanced Search page lets you list log files for Oracle Application Server components and allows you to filter the search for log files by certain log file attributes.

Starting on the View Logs Advanced Search page you can list log files using a search filter by performing the following steps:

  1. Select the desired components from the Available Components box by using the Move or Move All buttons to move components to the Selected Components box (some browsers support double clicking to move components between the boxes).

  2. Select a field from the Log File Attribute list.

  3. Select the Add Row button to add a row for the selected log file attribute.

  4. Enter the desired search value in the Value field.

  5. If you want to select additional fields with values, select the Add Another Row button and enter additional values.

  6. Select the Search button to perform the search. When the search returns, the Results section shows log files with matching fields.

To obtain more information on filtering using log file attributes, click the information icon next to the Log File Attribute list.

Figure 4-2 shows the Advanced Search Filter By Log File Attributes selection box, with the Log File Attribute list and the Add Row button.

Figure 4-2 Log Files Advanced Search Filter By Log File Attributes

Text description of filter.gif follows.

Text description of the illustration filter.gif

4.2.5 Viewing Log File Details and Log File Contents

After selecting the Search button from either the View Logs Simple Search or Advanced Search page, the View Logs page shows the search output at the bottom of the page in the Results section. You can sort the output by selecting column headings. For example, to sort results by size, select the Size (bytes) column heading (multiple selections on a column heading toggle ascending and descending sort).

To view log file contents, select the link shown in the Log File column.

After selecting a log file link, the Log File page shows the contents of the selected log file, and supports the following:

4.3 Searching Diagnostic Messages In A Log Repository

Application Server Control lets you search through diagnostic messages in a Log Repository containing messages collected from several Oracle Application Server components. The advantage of using a Log Repository is that you can search, view, and correlate diagnostic messages in a uniform way across multiple Oracle Application Server components.

This section covers the following topics:

4.3.1 Getting Started With Log Repository

To use a Log Repository for searching and viewing diagnostic messages, select the Logs link on a Application Server Control page and then select the Search Log Repository link. The Search Log Repository Simple Search and Advanced Search pages allow you to search the diagnostic messages stored in the Log Repository.

Figure 4-3 shows the Application Server Control Search Log Repository page.

The Log Repository needs to contain diagnostic messages before you can search the Log Repository. The Log Loader component initializes and updates the diagnostic messages in the Log Repository.


Note:

By default, the Oracle Application Server Log Loader is not started and does not load diagnostic messages.


See Also:

Section 4.5, "Using Oracle Application Server Log Loader" for information on starting and using Log Loader

4.3.2 Searching Log Repository With Simple Search

To search the Log Repository for diagnostic messages, go to the View Logs > Search Log Repository page, and use the Available Components and Selected Components boxes to select components. The online help describes the available search and display options for the View Logs > Search Log Repository page.

To search for diagnostic log entries in the Log Repository, do the following:

  1. Select components from the Available Components box (optional). Select components and then use the Move or Move All button to move the selected components to the Selected Components box (some browsers support double clicking to move components between the boxes). This step is optional.

  2. Use the default selections, or select the available search and result display options. The online help describes the available search and display options for the View Logs > Search Log Repository page.

  3. Select the Search button to search for messages in the Log Repository that match the constraints you specify. When the search returns, the Results section shows the matching diagnostic log messages from the Log Repository.


    Note:

    The Message Type selection box includes the Unknown option. Some components do not include a message type when the component writes log file entries. These messages are loaded into the Log Repository with Unknown specified as the message type.


    See Also:

    Section 4.3.4, "Viewing Repository Log Entry Details"

Figure 4-3 Search Log Repository Page

Text description of repos1.gif follows.

Text description of the illustration repos1.gif

4.3.3 Searching Log Repository With Advanced Search

To search the Log Repository for diagnostic messages using advanced search, go to the View Logs > Search Log Repository page, and select the Advanced Search button. On the View Logs > Search Log Repository Advanced Search page, use the Filter By Log Entry Fields box to select log fields and values to search. The View Logs pages shows the diagnostic log entries with matching field values when you enter after you select the Search button.

Figure 4-4 shows the Advanced Search Log Repository Filter By Log Entry Fields box.

To display Log Repository entries matching the Advanced Search filter, perform the following steps:

  1. Use the default selections, or specify search and result date range and message type options by making selections and entering constraints on the View Logs > Search Log Repository Advanced Search page.

  2. Select log entries with specified field values using the Filter by Log Entry Fields box. Select multiple fields using the Add Another Row button. When you specify values for multiple fields, the search only returns results that match all of the specified constraints. The online help describes the available search and display options for the View Logs > Search Log Repository page.

  3. Select the Search button to search for messages in the Log Repository that match the selection constraints. When the search returns, the Results section shows the matching log entries.

Figure 4-4 Search Log Repository Advanced Search Filter By Log Entry Fields

Text description of repos2.gif follows.

Text description of the illustration repos2.gif

See Also:

Section 4.3.4, "Viewing Repository Log Entry Details"

4.3.4 Viewing Repository Log Entry Details

Using either the link shown in the Time field of the Results area on the View Logs page, or by selecting entries in the Select field and then selecting the View Details button, you can view a log entry and its associated information, including the Message Type, Component, the Message Text, and optionally the Execution Context ID (ECID).

Figure 4-5 shows a log entry details page.

Figure 4-5 Log Repository Log Entry Details Page

Text description of logentry1.gif follows.

Text description of the illustration logentry1.gif

See Also:

Section 4.4, "Diagnosing Problems and Correlating Messages" for information on Execution Context IDs

4.3.5 Using Regular Expressions With Log Repository Search

Regular expression matching is applied when the checkbox in the Regular Expression field is selected on the Log Repository Simple Search or Advanced Search page. On the Simple Search page, the Regular Expression checkbox is under the Message Text field. On the Advanced Search page, the Regular Expression checkbox is in the Filter by Log Entry Fields box. Using a regular expression in a search allows you to enter a pattern description that enables you to match strings for a Log Repository search.

The Log Repository search uses the Apache Jakarta regular expression engine which uses "*" for a string of characters, "?" for a single character, and supports boundary matches, including "^" for a match only at the beginning of an entry, and "$" for a match only at the end of an entry, and special characters, including "\t" for Tab, "\n" for newline, "\r" for return, and "\f" for form feed.

See Also:

http://jakarta.apache.org/regexp for more information on supported regular expressions

4.4 Diagnosing Problems and Correlating Messages

Generally Administrators and others view log file data to diagnose, monitor, and search for component errors or problems that may cause component errors. Application Server Control supports a unified architecture and provides cross component tools that can assist you in these tasks.

This section covers the following topics:

4.4.1 Correlating Messages Across Log Files and Components

Certain Oracle Application Server components provide message correlation information for diagnostic messages. Message correlation information helps those viewing diagnostic messages determine relationships between messages across components. The Execution Context ID (ECID), is a globally unique identifier associated with a thread of execution. The ECID helps you to use log file entries to correlate messages from one application or across application server components. By searching related messages using the message correlation information, multiple messages can be examined and the component that first generates a problem can be identified (this technique is called first-fault component isolation). Message correlation data can help establish a clear path for a diagnostic message across components, within which errors and related behavior can be understood.

When you view an entry on the Log Entry Details page in Application Server Control, if the Execution Context ID field is available, it displays the Execution Context ID as a link. Selecting the Execution Context ID link shows you all the messages with the same execution context ID.

You can use the ECID to track requests as they move through Oracle Application Server.

The ECID takes the following format:

request_id, sequence_number

The request_id is a unique integer that is associated with each request. The sequence_number represents the hop number of the request, as it passes through Oracle Application Server (or through the component). For example, OracleAS Web Cache assigns an initial sequence number of 0 to a request (when OracleAS Web Cache handles the request). After that, the sequence number is incremented as the request moves through Oracle Application Server components.

Table 4-2 lists the Oracle Application Server components that provide message correlation information (using an ECID).


Note:

Some Oracle Application Server components do not support generating message correlation data. Other Oracle Application Server components support generating message correlation data, but by default do not enable this option.


Table 4-2  Oracle Application Server Components Supporting Message Correlation
Component Message Correlation Configuration Reference

DCM

DCM supports message correlation.

OC4J

OC4J supports message correlation when ODL logging is enabled and when the property oracle.dms.transtrace.ecidenabled is set to the value true (by default this is false). This property is set on the OC4J command line.

See Also: "Configuring Components to Produce ODL Messages and ECIDs"

Oracle Application Server Containers for J2EE User's Guide for details on enabling ODL logging in OC4J.

HTTP Server

Oracle HTTP Server supports message correlation.

See Also: Section 4.6.5, "Configuring Components to Produce ODL Messages and ECIDs"

Portal

Portal supports message correlation. Portal outputs the ECID with error messages in the Portal Repository Diagnostics log file.

See Also: "Diagnosing OracleAS Portal Problems" Oracle Application Server Portal Configuration Guide.

Web Cache

Web Cache supports message correlation.

See Also: the section, "Oracle-ECID Request-Header Field" in Chapter 2, "Caching Concepts" in the Oracle Application Server Web Cache Administrator's Guide

4.4.2 Diagnosing Component Problems

When an Oracle Application Server component has a problem you can isolate and determine the cause of the problem by viewing the diagnostic messages. There are general techniques that can assist you in accomplishing this task. In general, the techniques include the following:

Using a Log Repository can make searching for the root cause of a problem much easier. A Log Repository consolidates log file data and allows you use to easily search, correlate, and view log file data that is generated by multiple Oracle Application Server components. A Log Repository correlates cross component information by time, and correlates events that occur in a cascading fashion. Once a problem is isolated to a particular component in the repository, then, if needed, the problem can be further analyzed by examining the component-specific diagnostic files.

See Also:

Section 4.5, "Using Oracle Application Server Log Loader"

4.5 Using Oracle Application Server Log Loader

The Oracle Application Server Log Loader component works to place messages in the Log Repository. A Log Repository stores diagnostic messages from multiple log files across Oracle Application Server components. After the Log Loader starts, at regular intervals it reads the contents of log files incrementally and stores the contents to the Log Repository.

This section covers the following topics:

4.5.1 Starting and Stopping Log Loader

You can use the controls on the Application Server Control Log Loader page to start and stop the Log Loader. Starting the Log Loader starts the Oracle Application Server component that periodically updates the Log Repository. Stopping the Log Loader stops the Oracle Application Server component that periodically updates the Log Repository.


Note:

By default, when Oracle Application Server is installed, the Log Loader is stopped.


To start the log loader, perform the following steps:

  1. Select the Logs link on any Application Server Control page.

  2. From the View Logs page select the Search Log Repository link.

  3. Select the Log Loader button on the view logs page.

  4. On the Log Loader page, select the Start button.

  5. After selecting the Start button, on the confirmation page select either, Cancel, Start, or Start and Load Existing Logs. Use the Cancel button on this page to cancel, use the Start button to start the Log Loader, and use the Start and Load Existing Logs button to start and initialize the log repository with the existing log messages (using Start and Load Existing Logs is usually recommended, since this operation may be faster than simply starting the Log Loader).

    See Also:

    Section 4.3, "Searching Diagnostic Messages In A Log Repository"

4.5.2 Enabling and Disabling Log Loader

On the Log Loader page, the Enable button enables the Log Loader. By default, when you first install Oracle Application Server, the Log Loader is enabled. Disabling the Log Loader specifies that the Log Loader's own log files are not shown in the component lists on the View logs page.

4.5.3 Updating the Log Configuration

When the Log Loader starts, it loads configuration information about the component log files to use as source for the diagnostic messages that are stored in the Log Repository (this includes information on the location and format of the log files). If the instance is reconfigured after the Log Loader is started, for example when a new component is added, use the Update Log Configuration button to update the Log Loader configuration. Updating the log configuration lets the Log Loader reread configuration files to locate and load all the component log files into the Log Repository.

See Also:

Section 4.6.4, "Component Diagnostic Log File Registration"

4.5.4 Setting Log Loader Properties

You can set Log Loader properties from the Log Loader page. To navigate to the Log Loader page:

  1. Select the Logs link on any Application Server Control page.

  2. From the View Logs page select the Search Log Repository link.

  3. Select the Log Loader button on the view logs page.

  4. Select the Log Loader Properties link in the Administration section.The Log Loader Properties page includes fields showing the current values for the Log Loader properties.

To change the Log Loader properties, perform the following steps:

  1. Enter updated values in the appropriate fields on the Log Loader Properties page.

  2. Select the Apply button to apply the new values.

Figure 4-6 shows the Application Server Control Log Loader Properties page.

The Application Server Control online help includes detailed information on the Log Loader Properties fields.

Figure 4-6 Log Loader Properties Page

Text description of loaderprop.gif follows.

Text description of the illustration loaderprop.gif

4.5.5 Understanding Log Loader Diagnostic Messages

The Log Loader logs its diagnostic messages, including errors to its log file. Diagnostic messages might include errors encountered due to an incorrect configuration, or errors that occur while the Log Loader is reading data from a log file or is writing data to the log repository.

The common Log Loader problems include:

  1. Errors in the Log Loader configuration file ($ORACLE_HOME/diagnostics/config/logloader.xml). Errors in the configuration file usually prevent the Log Loader from running. Such errors need to be corrected before the Log Loader can work properly.

  2. Configuration errors that occur when a component's registration file contains errors ($ORACLE_HOME/diagnostics/config/registration/*.xml). Errors in the registration files do not prevent the Log Loader from running but may prevent the contents of certain log files from being loaded in the repository. Typically, there are two common types of registration file errors:

    1. XML syntax errors that prevent the file from being parsed. If such errors are encountered, the Log Loader completely ignores the contents of the file.

    2. A wrong path specified for a configuration file. If the Log Loader cannot find a log file at the specified path, it issues a Warning level diagnostic message. This does not always indicate an error, for example, it is possible that the component that generates that log was not active when the Log Loader started and the log file had not been created yet. The Log Loader continues to look for the log file and starts reading messages when the log file is created.

  3. Errors may occur while the Log Loader is reading messages from a log file. If the log file includes contents that cannot be read or parsed, then the Log Loader issues a log message indicating that it cannot read part of the contents of the file. In this case, the Log Loader attempts to recover from the error and continue to read the Log File.

  4. Errors may occur when writing messages to the repository (for example, a disk error). This type of error may indicate a problem that may require attention from the system administrator to correct the problem.

  5. The Log Loader produces an error message when it skips reading log files because a log file exceeds the currently specified maximum load size. The maximum load size can be specified on the Log Loader properties page.

    In this case the Log Loader logs an error message in the following format:

    Size of data to be read from log /logfile exceeds threshold of x bytes. 
    Skipping y_skipped bytes and moving to end of log.
    
    

    This message indicates the size of data to be read exceeds the specified maximum load size x, and that the Log Loader is skipping to the end of the log file. The error message provides information on the name of the log file /logfile, and the number of bytes skipped y_skipped.

4.6 Advanced Logging Topics

This section covers the following topics:

4.6.1 Using the printlogs Tool to View Log Messages

The printlogs tool is a command-line alternative to Application Server Control for viewing log messages. printlogs supports a variety of options for gathering and filtering log messages, and prints the results to standard output in a single format. For example, you can use printlogs to:

4.6.2 Understanding ODL Messages and OLD Log Files

This section covers the following topics:

4.6.2.1 ODL Message Contents

Using ODL, diagnostic messages are written to log files using XML format and each message includes a HEADER element containing information about the message, optionally a CORRELATION_DATA element containing information to assist in correlating messages across components, and a PAYLOAD element containing the message text including optional arguments and associated values.

Table 4-3 describes the contents of an ODL message header. Table 4-3 includes the optional header fields. For any given component that produces ODL format messages, the optional header fields may not be present in the generated diagnostic messages.

Example 4-1 shows a sample ODL format message that includes the optional CORRELATION_DATA element.

Example 4-1 Sample ODL Message Content

MESSAGE>
  <HEADER>
    <TSTZ_ORIGINATING>2002-04-01T18:38:48.058-08:00</TSTZ_ORIGINATING>
    <ORG_ID>oracle.com</ORG_ID>
    <COMPONENT_ID>OHS</COMPONENT_ID>
    <HOSTING_CLIENT_ID>0.0.255.255</HOSTING_CLIENT_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>17</MSG_LEVEL>
    <HOST_ID>test-perf9</HOST_ID>
    <HOST_NWADDR>0.0.255.255</HOST_NWADDR>
    <MODULE_ID>apache_core</MODULE_ID>
    <PROCESS_ID>5713</PROCESS_ID>
  </HEADER>
  <CORRELATION_DATA>
    <EXEC_CONTEXT_ID>       <UNIQUE_ID>1017715128:255..255.255.88:5713:0:1</UNIQUE_ID>       <SEQ>1</SEQ>     </EXEC_CONTEXT_ID> </CORRELATION_DATA> <PAYLOAD> <MSG_TEXT>File does not exist: /files/Apache/docs/images/java-apache-project.gif     </MSG_TEXT>   </PAYLOAD> </MESSAGE>

Table 4-3  ODL Format Message Header Fields
Header Field Name Description Required

COMPONENT_ID

Specifies the product or component ID for the component that originated the message.

Required

HOST_ID

Specifies the DNS host network ID.

Optional

HOST_NWADDR

Specifies the IP or other network address for the originating host.

Optional

HOSTING_CLIENT_ID

Specifies the ID of the client or security group that the message relates to.

Optional

MODULE_ID

Specifies the ID for the module that originated the message.

Optional

MSG_GROUP

Name of the group the message belongs to, for purposes of selecting similar messages.

Optional

MSG_ID

Specifies the message ID. The message ID uniquely identifies the message.

Optional

MSG_LEVEL

Specifies an integer value that qualifies the message type (MSG_TYPE). Lower level values are for higher severity errors. Valid Values: 1 - 32

Optional

MSG_TYPE

Specify the type of the message, which is one of: INTERNAL_ERROR, ERROR, WARNING, NOTIFICATION, TRACE, UNKNOWN. If MSG_TYPE is included, the TYPE attribute is required when MSG_TYPE is included in the message header.

Required

ORG_ID

Specifies the organization ID, for the originating component. This is usually the domain name for the organization.

Optional

PROCESS_ID

Specifies the process ID for the process, or execution unit associated with the message. Java components may use this field to specify the process ID and the thread ID, or only the thread ID.

Optional

TSTZ_NORMALIZED

Timestamp normalized for clock drift across hosts. This field is used when the diagnostic message is copied to a repository in a different hosts.

Optional

TSTZ_ORIGINATING

Timestamp with local timezone. This specifies the date and time when the message was generated.

Required

USER_ID

Specifies the User ID associated with the message.

Optional

4.6.2.2 ODL Log File Naming

Using ODL, Oracle Application Server components write diagnostic log files to a logging directory. Components determine the names for logging directories using a component specific naming convention.

An ODL log is a set of log files that includes: the current ODL log file, typically named log.xml, and zero or more ODL Archives (segment files) that contain older messages. As the log file grows, new information is added to the end of the log file, log.xml. Each ODL log can specify a maximum segment size. When the log file reaches the maximum segment size, it is renamed and a new log file, log.xml is created (specify the maximum ODL segment size using component-specific configuration options).


Note:

Some Oracle Application Server components, in particular the Oracle HTTP Server, do not support the ODL log file naming mechanism that this section describes. In the Oracle HTTP Server, ODL diagnostic messages are written to a file, log.xml, that does not have a configurable size limit.


Segment files are created when the ODL log file log.xml reaches the maximum segment size. That is, the log.xml is renamed to logn.xml, where n is an integer, and a new log.xml file is created when the component generates new diagnostic messages.

To limit the size of the ODL log, components use a configuration option specifying the maximum size of the logging directory. Whenever the sum of the sizes of all of the files in the directory reaches the maximum, the oldest archive is deleted to keep the total size under the specified limit.


Note:

The most recent segment file is never deleted.


For example, when the maximum directory size is reached, with the starting segment file named log9872, the following files could be present in the log file directory:

File                        Size

log.xml                     10002
log9872.xml                 15000
log9873.xml                 15000
log9874.xml                 15000
log9875.xml                 15000
log9876.xml                 15000


In this case, when log.xml fills up, log9872.xml is removed and log.xml is moved to the new file log9877.xml; new diagnostic messages then are written to a new log.xml.

Using ODL provides the following benefits:

4.6.3 Understanding Log Loader Log File Format Conversion

The Log Loader reads logs in several different formats and it converts the contents of non-ODL logs to ODL format. In most cases, the resulting ODL log record will contain only a timestamp and the message text from the original log entry. Values for other ODL message fields, such as COMPONENT_ID and MODULE_ID can be provided in the log registration file for each log, so that these values are set to all log records parsed from the log. The Log Loader attempts to determine the severity or level of each non-ODL log and generate an appropriate ODL message type. However, in many cases, if the severity or level cannot be determined, the resulting ODL log record will have the message type set to UNKNOWN.

The Log Loader can even read "unformatted" logs, that may not even contain timestamp values. This is the case for several logs in the $ORACLE_HOME/opmn/logs directory which contain redirected output from Oracle Application Server processes managed by Oracle Process Manager and Notification Server. When log entries do not contain a timestamp, the Log Loader will set the timestamp to the value of the "last known timestamp" for that log. The value of the last known timestamp is determined according to the following rules:

  1. The initial value of the last known timestamp is zero. Note that whenever adding a log record to the repository, a zero value timestamp will be converted to the current time.

  2. If the Log Loader finds an Oracle Process Manager and Notification Server generated timestamp it will set the last known timestamp with its value.

  3. When the Log Loader reaches the end of the log, it sets the last known timestamp with the current time. If the Log Loader is running regularly, such as once every five minutes, this will result in timestamps that are approximate to the actual time the message was written within a five minute range. If the Log Loader is not run frequently, the value of these timestamps could be inaccurate.


    Note:

    The OC4J redirected logs found in the $ORACLE_HOME/opmn/logs directory are not treated as "unformatted" logs, since each line in the OC4J logs contains a timestamp. Most other logs in this directory are treated as unformatted logs, and will have timestamps assigned according to the preceding rules.


4.6.4 Component Diagnostic Log File Registration

Application Server Control and the Log Loader read Oracle Application Server component diagnostic registration files to determine names, locations, and additional configuration information about diagnostic log files. The directory $ORACLE_HOME/diagnostics/config/registration contains the diagnostic log file registration files.

Oracle Application Server components may have multiple registration files in the configuration registration directory.

The format for the registration files includes a Oracle Application Server component ID, and extension, .xml. Table 4-4 lists the Oracle Application Server Components and their associated Component IDs.


Note:

Components are responsible for creating the component diagnostic registration files. Normally, Oracle Application Server Administrators should not modify these files.


Table 4-4  Component IDs For Diagnostic Log File Configuration
Component Name Component ID

BC4J

BC4J

DCM

DCM

Discoverer

DISCOVER

Enterprise Manager

EM

HTTP Server

OHS

Infrastructure Database

RDBMS

Internet Directory

OID

Listener for Infrastructure Database

LISTENER

Log Loader

LOGLOADER

OC4J

OC4J

OPMN

OPMN

Port Tunneling

IASPT

Portal

PORTAL

ProcessConnect

INTEGRAT

Reports

REPORTS

Single Sign-On

SSO

TopLink

TOPLINK

Ultra Search

ULTRSRCH

Universal Installer

OUI

Web Cache

WEBCACHE

Wireless

WIRELESS

4.6.5 Configuring Components to Produce ODL Messages and ECIDs

Table 4-5 lists the Oracle Application Server components that support ODL messages but that generate text messages by default. By making configuration changes, these components can be configured to produce ODL messages and for OC4J, an ECID.

This section covers the following topics:

See Table 4-1 for the complete list of Oracle Application Server components that produce ODL messages.

Table 4-5  Oracle Application Server Components with Configuration Options for Supporting ODL
Component Default Format ODL Support Location

HTTP Server

Text

Yes

$ORACLE_HOME/Apache/Apache/logs

OC4J Instance

Text

Yes

$ORACLE_HOME/j2ee/instance_name/log

$ORACLE_HOME/j2ee/application-deployments/application_name/application.log

4.6.5.1 Configuring Oracle HTTP Server to Produce ODL Messages

To configure the Oracle HTTP Server to produce ODL messages, perform the following steps:

  1. Add a directory named oracle where the Oracle HTTP Server ODL messages will be stored. The directory should be located at the following location:

    %ORACLE_HOME/Apache/Apache/logs
    
    
  2. Using Application Server Control or the dcmctl command line utility, modify the httpd.conf file to set the value of the OraLogMode and OraLogSeverity directives. Using Application Server Control, from the Administration section of the HTTP_Server page select the Advanced Server Properties link. Specify the OraLogMode and OraLogSeverity directives in httpd.conf.

    For example:

    OraLogMode oracle
    OraLogSeverity NOTIFICATION
    
    
  3. Using Application Server Control, restart the HTTP Server.

    See Also:

    Oracle HTTP Server Administrator's Guide for details on using the OraLogMode and OraLogSeverity directives

4.6.5.2 Configuring OC4J to Produce ODL Messages

The supplied configuration files for OC4J include commented out specifications for ODL logging. Enabling ODL logging in OC4J involves uncommenting the ODL configuration options and restarting the associated OC4J instance.

To change the ODL logging configuration for OC4J, use Application Server Control to select the Administration link for the OC4J instance that you want to enable ODL logging. Then, select the Advanced Properties link to show the Advanced Server Properties page. On this page, edit the configuration files and uncomment the lines that contain the <odl> element.

See Also:

Chapter 3, "Advanced Configuration Development, and Deployment" in Oracle Application Server Containers for J2EE User's Guide

4.6.5.3 Configuring OC4J to Produce ECIDs

OC4J supports generating an Execution Context ID (ECID) for its log file entries. You can use the ECID to track requests as they move through Oracle Application Server, or through OC4J. By default ECID generation is disabled in OC4J.

To enable ECID generation in OC4J, set the Java command-line option -Doracle.dms.transtrace.ecidenabled=true.

To modify Java command line options using Application Server Control, do the following:

  1. Select the Administration link on the OC4J Home Page of the application server instance of interest.

  2. Select Server Properties in the Instance Properties area.

  3. Scroll down to the Multiple VM Configuration section. This section defines the ports and the command line options for OC4J and for the JVM that runs OC4J processes.

  4. Under the Command Line Options area, add the following at the end of the Java Options text field:

    -Doracle.dms.transtrace.ecidenabled=true
    
    
  5. Select the Apply button.

Note the following when setting the oracle.dms.transtrace.ecidenabled property:

4.6.6 Limitations and Configuration

The Logs link in Application Server Control gives you an integrated view of many Oracle Application Server component log files. However, certain log files are only available at the component level. Oracle Application Server components use the directory $ORACLE_HOME/diagnostics/config/registration to make their log files visible to Application Server Control. Some Oracle Application Server component log files are not exposed through Application Server Control pages.


Go to previous page Go to next page
Oracle
Copyright © 2002, 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index