Oracle® Application Server 10g Administrator's Guide
10g (9.0.4) Part No. B10376-02 |
|
![]() |
![]() |
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:
The Oracle Enterprise Manager 10g Application Server Control Console (Application Server Control Console) lets you list and search log files across Oracle Application Server components. You can view log files from the Application Server Control Console pages or download a log file to your local client and view the log files using another tool.
This section covers the following topics:
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 the Application Server Control Console, 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:
Log File Messages by Component
Note: Some Oracle Application Server components do not support ODL. Other components support ODL, but do not enable ODL by default. |
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.
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 | LocationFoot 1 |
---|---|---|---|
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 |
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
|
OID | Text | No | ORACLE_HOME /ldap/log
|
OPMN | Text | No | ORACLE_HOME /opmn/logs
|
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
|
The Application Server Control Console 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 the Application Server Control Console 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 the Application Server Control Console to start Log Loader. |
Administrators configure logging options to manage and limit the logging information that Oracle Application Server components generate and save.
Note: The Application Server Control Console does not directly support configuring logging options. In many cases, to configure component logging options you need to use the Application Server Control Console Advanced Server Properties page to edit the values in configuration files. |
The logging configuration options include:
Specifying Log File Names and Pathnames – Most Oracle Application Server components let you specify the directory for storing diagnostic log files. Specifying the diagnostic logging directory allows Administrators to manage system and network resources.
Limiting Log File Size – As Oracle Application Server components run and generate diagnostic messages, the size of the log files increases. Oracle Application Server components use one of several strategies to deal with log file size. Some components allow log files to keep increasing in size; in this case it is the Administrator's responsibility to monitor and cleanup the log files. Other components, including OC4J let you specify configuration options that limit how much log file data is collected and saved.
Using Log File Archiving – Certain Oracle Application Server components let you specify configuration options to control the size of diagnostic logging directories. This lets you determine a maximum size for the directories containing a component's log files. When the maximum size is reached, older logging information is deleted before newer logging information is saved.
Setting Component Logging Levels – Certain Oracle Application Server components, including the Oracle HTTP Server, allow Administrators to configure logging levels. By configuring logging levels, the number of messages saved to diagnostic log files can be reduced. For example, you can set the logging level so that the system only reports and saves critical messages.
See Also: Oracle Application Server component documentation for information on setting logging configuration options. |
Use the Oracle Enterprise Manager 10g Application Server Control Console to list log files by selecting the Logs link on the Application Server Control Console. 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:
Selecting the Logs link on the Application Server Control Console shows the View Logs page. To list the log files, starting on the View Logs page perform the following steps:
Select the Move All button to move all available components to the Selected Components box.
Select the Search button to list the log files for the selected components.
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 Console View Logs page after a search.
Using the Application Server Control Console, 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:
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).
Select the Search button to list the log files for the selected components.
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.
After you select a system component link on the Application Server Control Console main page, you can view the component log files by selecting the Logs link. When you select this link, the Application Server Control Console 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.
After selecting the Logs link on an Application Server Control Console 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:
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).
Select a field from the Log File Attribute list.
Select the Add Row button to add a row for the selected log file attribute.
Enter the desired search value in the Value field.
If you want to select additional fields with values, select the Add Another Row button and enter additional values.
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
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:
The Refresh list determines whether the file view is updated manually or automatically. Select Automatically when you want to refresh the page at regular intervals. The Log File page scrolls to the bottom when a page refreshes.
Selecting the refresh icon next to the Page Refreshed date, on either the top or the bottom of the page, initiates manual refresh. Each refresh displays the log entries added since the last refresh.
Selecting the Log File link lets you use browser features to display, print, or download the log file.
The Application Server Control Console 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:
To use a Log Repository for searching and viewing diagnostic messages, select the Logs link on an Application Server Control Console 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 Console 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 |
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:
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.
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.
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. |
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:
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.
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.
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
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.
See Also: Section 4.4, "Diagnosing Problems and Correlating Messages" for information on Execution Context IDs |
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.
Generally Administrators and others view log file data to diagnose, monitor, and search for component errors or problems that may cause component errors. The Application Server Control Console supports a unified architecture and provides cross component tools that can assist you in these tasks.
This section covers the following topics:
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 the Application Server Control Console, 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: Section 4.6.5, "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 |
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:
Search for errors, or warnings, related to the problem
Correlate the errors across components
Correlate the errors across a time interval
Perform component based analysis
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.
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:
You can use the controls on the Application Server Control Console 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:
Select the Logs link on any Application Server Control Console page.
From the View Logs page select the Search Log Repository link.
Select the Log Loader button on the view logs page.
On the Log Loader page, select the Start button.
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).
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.
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.
You can set Log Loader properties from the Log Loader page. To navigate to the Log Loader page:
Select the Logs link on any Application Server Control Console page.
From the View Logs page select the Search Log Repository link.
Select the Log Loader button on the view logs page.
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:
Enter updated values in the appropriate fields on the Log Loader Properties page.
Select the Apply button to apply the new values.
Figure 4-6 shows the Application Server Control Console Log Loader Properties page.
The Application Server Control Console online help includes detailed information on the Log Loader Properties fields.
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:
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.
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:
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.
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.
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.
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.
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.
This section covers the following topics:
The printlogs
tool is a command-line alternative to the Application Server Control Console 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:
Read log messages from the Log Repository or individual log files
Filter log messages according to timestamp or log field value
Print log messages in ODL or text format
Sort log messages by field
Report the number of log messages of a specified type
Run in a continuous loop, printing log reports and sleeping for a specified amount of time
This section covers the following topics:
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-4 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 |
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 log
n
.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:
Limits the total amount of diagnostic information saved
Older segment files are removed and newer segment files are saved in chronological fashion
Components can remain active, and do not need to be shutdown, when diagnostic logging files are cleaned
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:
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.
If the Log Loader finds an Oracle Process Manager and Notification Server generated timestamp it will set the last known timestamp with its value.
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.
|
The Application Server Control Console 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 |
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 | LocationFoot 1 |
---|---|---|---|
HTTP Server | Text | Yes | ORACLE_HOME /Apache/Apache/logs
|
OC4J Instance | Text | Yes | ORACLE_HOME /j2ee/ instance_name /log
|
To configure the Oracle HTTP Server to produce ODL messages, perform the following steps:
Add a directory named oracle
where the Oracle HTTP Server ODL messages will be stored. The directory should be located at the following location:
(UNIX) ORACLE_HOME/Apache/Apache/logs (Windows) ORACLE_HOME\Apache\Apache\logs
Using the Application Server Control Console or the dcmctl
command line utility, modify the httpd.conf
file to set the value of the OraLogMode
and OraLogSeverity
directives. Using the Application Server Control Console, 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
Using the Application Server Control Console, restart the HTTP Server.
See Also: Oracle HTTP Server Administrator's Guide for details on using theOraLogMode and OraLogSeverity directives
|
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 the Application Server Control Console 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 |
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 the Application Server Control Console, do the following:
Select the Administration link on the OC4J Home Page of the application server instance of interest.
Select Server Properties in the Instance Properties area.
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.
Under the Command Line Options area, add the following at the end of the Java Options text field:
-Doracle.dms.transtrace.ecidenabled=true
Select the Apply button.
Note the following when setting the oracle.dms.transtrace.ecidenabled
property:
The default value for oracle.dms.transtrace.ecidenabled
is false
.
The property applies for the entire OC4J instance and it cannot be set to different values for different applications running on OC4J.
When ODL is enabled for OC4J, and you specify oracle.dms.transtrace.ecidenabled=false
, OC4J uses an ECID that is generated from within OC4J, rather than receiving the ECID from Oracle HTTP Server. When ODL is enabled for OC4J, all log messages should include an ECID.
See Also: "Advanced Configuration Development, and Deployment" in Oracle Application Server Containers for J2EE User's Guide |
The Logs link in the Application Server Control Console 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 the Application Server Control Console. Some Oracle Application Server component log files are not exposed through Application Server Control Console pages.