Logging Features in Oracle E-Business Suite

Overview

Oracle E-Business Suite provides several types of logs in its products. This chapter focuses on the Logging Framework, which enables you to set up and view log messages in Oracle Applications Manager.

Other types of log files are discussed in the documentation for their respective product area.

The Logging Framework

The Oracle E-Business Suite Logging Framework provides the ability to store and retrieve log messages for debugging, error reporting, and alerting purposes.

You can set up, view, and purge log messages through HTML-based user interface pages that are located in Oracle Applications Manager.

These messages must be written into the code by developers. For more information, refer to Oracle E-Business Suite Developer's Guide.

Configuring the Logging Framework

The following sections cover configuration of the Logging Framework.

Using Application Tier Properties to Configure Logging

All application tier property settings take precedence over profile option settings. Configuring logging using Java system properties (usually by setting the Apache JServ system properties in the jserv.properties file) is a quick way to turn on logging for all sites or users, regardless of current profile option settings. Application tier properties only affect the application tier code, and do not affect the PL/SQL layer logging.

Using Java

Java system properties can be defined for controlling logging for each JVM.

The following examples show how to turn on logging for all modules and levels using Java system properties.

For this example, we assume that the JVM has write permission for the file "/path/to/apps.log". This file can be changed to any other file for which the JVM has write permission.

If you plan to log to a file, it is highly recommended that you explicitly override the default file "aferror.log" by setting AFLOG_FILENAME. The default does not specify a full file path, and may not be writable by the application tier process in some cases.

Command Line JVM System Properties

To enable logging for an application (for example, MyClass) that is run from the command line, add the parameter values to the command line:

/local/java/jdk1.2.2/bin/java \ 
-DAFLOG_ENABLED=TRUE -DAFLOG_LEVEL=STATEMENT \
-DAFLOG_MODULE=% -DAFLOG_FILENAME=/path/to/apps.log MyClass

Apache JServ Java System Properties

To enable logging using Apache JServ JVM system properties, add the following to the jserv.properties file (typically located in $IAS_ORACLE_HOME/Apache/Jserv/etc/):

wrapper.bin.parameters=-DAFLOG_ENABLED=TRUE  
wrapper.bin.parameters=-DAFLOG_LEVEL=STATEMENT  
wrapper.bin.parameters=-DAFLOG_MODULE=%  
wrapper.bin.parameters=-DAFLOG_FILENAME=/path/to/apps.log 

A convenient location for the log file in this case is the log directory used by JServ ($IAS_ORACLE_HOME/Apache/Jserv/logs/).

Using C

Environment variables can be defined for controlling logging for each C process.

The following examples show how to turn on logging for all modules and levels using C Environment variables.

For this example, we assume that the C process has write permission for the file "/path/to/apps.log". This file can be changed to any other file for which the C process has write permission.

If you plan to log to a file, it is highly recommended that you explicitly override the default file "aferror.log" by setting AFLOG_FILENAME. The default does not specify a full file path, and may not be writable by the application tier process in some cases.

!#/bin/csh
setenv AFLOG_ENABLED Y
setenv AFLOG_LEVEL STATEMENT
setenv AFLOG_MODULE %
setenv AFLOG_FILENAME /path/to/apps.log
./C-Executable

Using Oracle Application Object Library Profile Options to Configure Logging

You can configure logging by setting the appropriate Oracle Application Object Library (FND) profile options. The following table lists profile option names and sample values:

Profile Options
Profile Option Name User Specified Name Sample Value
AFLOG_ENABLED FND: Debug Log Enabled "Y"
AFLOG_MODULE FND: Debug Log Module "%"
AFLOG_LEVEL FND: Debug Log Level "ERROR"
AFLOG_FILENAME FND: Debug Log Filename "/path/to/apps.log"

The available levels are Site, Application, Responsibility, and User. User settings override Responsibility settings, Responsibility settings override Application settings, and Application settings override Site settings.

To emphasize this point, the following is a summary of the impacts of the different profile option levels:

Using Logging to Screen

In addition to the above methods where log messages are written to a file or the database, Logging to Screen provides:

If Logging to Screen is enabled, then the Java log messages generated for a particular HTTP Request-Response are buffered in memory and appended to the end of the generated HTML page.

This feature does not affect any existing configurations of file or database logging. File or database logging continues to behave per the configured application tier log properties and/or log profile values.

Note that this mechanism currently provides only Java layer messages. Regular file or database logging should be used if messages from other layers (such as PL/SQL) are needed.

Enabling Logging to Screen in Oracle Application Framework Pages

For security reasons, this feature is only accessible if the "FND: Diagnostics" Profile is set to "Yes".

Use the following procedure to enable Logging to Screen in pages based on the Oracle Application Framework:

  1. Click the Diagnostics button.

  2. Select Show Log to Screen from the drop-down list.

  3. Choose an appropriate log level.

  4. Optionally, enter a module filter criteria such as jtf*. [In URLs, use the asterisk symbol (*) as a wildcard character, not the percent sign (%).]

Enabling Logging to Screen in CRM Technology Foundation Pages

For security reasons, this feature is only accessible if the "FND: Diagnostics" Profile is set to "Yes".

To enable logging to screen in pages based on the CRM Technology Foundation, append the following to the page's URL:

jtfdebug

Specify the logging level that should be displayed on the current screen.

jtfdebugfilter

(Optional) If desired, this parameter can be used as a filter to display messages based on a Java package name.

For example: <current_url>&jtfdebug=STATEMENT&jtfdebugfilter=jtf*

[In URLs, use the asterisk symbol (*) as a wildcard character, not the percent sign (%).]

Startup Behavior

At startup, applications do not have access to profile values. If application tier properties are not set, then at startup, the system defaults to logging as follows:

After a connection to the database has been established, the site-level log profiles are read. When the user, responsibility, and application have been established, the Oracle Application Object Library (FND) profiles are read for that user.

For Java and PL/SQL applications, the logging system is initialized by FND_GLOBAL.INITIALIZE (which is called from APPS_INITIALIZE), which is called normally as part of the startup of every Java application session, form, report, or concurrent program. At that point, it has user information and will log with the proper user profiles. Before the FND_GLOBAL.INITIALIZE, if the logging system is called it will self-initialize and log with the site- level profile values.

For Java applications, this is the sequence of startup steps:

  1. If any of the log parameters are set as Java system properties, then use them.

  2. Logging is not disabled using the Java system property AFLOG_ENABLED=FALSE, and if any of the remaining log parameters are not set as system properties, then retrieve the corresponding Oracle Application Object Library (FND) profile option values from the database. User-level profile values override responsibility-level profile values, which override application-level profile values, which override site-level profile values.

  3. If any of the log parameters are not set either as system properties or as profile values (or they are not accessible due to an error), then use the default values.

Guidelines for the Logging Framework

Set up your system for logging according to the following guidelines. We recommend that you use Oracle Applications Manager as the user interface for any log management tasks.

Recommended Default Site-Level Settings

For normal operations, we recommend that you configure your system as follows:

Recommended Settings for Debugging

If you need to lower the logging level in order to gather information about a system error, use the following recommended configurations. (As stated above, the default logging level should be UNEXPECTED. This maintains optimum system performance.)

Using Logging to Screen

For Java-based pages that are based on the Oracle CRM Technology Foundation or the Oracle Application Framework, if you have access to the browser that is displaying the generated HTML, you can use the Logging to Screen feature to view further details if an error is reported. See: Using Logging to Screen.

This lightweight mechanism works best in cases where:

Pinpointing an Error to a Specific User

You can use Oracle Application Object Library profiles to enable logging for the specific user, responsibility, and application that were active when the error occurred. Ask the user to log in again for the profile changes to take effect. Remember to return the profiles to their usual values after debugging has been completed.

If you suspect that certain code is causing the problem, then use hierarchical module filters to restrict which messages are logged. For example: fnd.common.%

Set the logging level according to the appropriate level of detail. Recall that EVENT messages report key progress events, while EXCEPTION, ERROR, and UNEXPECTED messages report failures.

For High Volumes

For high load, high volume scenarios, you can log application tier messages to a local file, which is faster than logging to a remote database. To do so, define the AFLOG_FILENAME property to write all application tier logging to a local file. Be sure to limit the number of generated messages:

For maintenance purposes, you should periodically rotate log files and purge old messages from the database table.

Updating Configuration Properties

If you have configured logging using application tier properties, you need to restart the affected processes for any changes to be picked up.

If you have configured logging using FND Log Profiles, you need to request the user to log in again (no restart is needed)

If you have configured logging using Logging to Screen, the update is immediate. No re-login or restart is needed.

How to Completely Disable Logging

Use the following procedure to completely disable logging:

See the "Updating Configuration Properties" section above for details on how and when the modified values come into effect.

Purging Log Messages

You should periodically delete old log messages to account for the space limitations of the database table. In addition, you should periodically rotate log files.

There are several ways to purge log messages. They are described below:

Using a Concurrent Program

The concurrent program "Purge Debug Log and System Alerts" (Short name: FNDLGPRG) is the recommended way to purge messages. This program purges all messages up to the specified date, except messages for active transactions (new or open alerts, active ICX sessions, concurrent requests, and so on). This program is by default scheduled to run daily and purge messages older than 7 days. Internally this concurrent program invokes the FND_LOG_ADMIN APIs, which are described later in this document.

Using Oracle Applications Manager

Navigate to System Alerts and Metrics from the Navigate to drop-down list on the Applications Dashboard. Then click Logs.

Using the Oracle CRM System Administrator Console

Navigate to Settings > System > Debug Logging.

Using PL/SQL

You can use the FND_LOG_ADMIN PL/SQL package to delete log messages.

For example:

SET SERVEROUTPUT ON
declare
    del_rows NUMBER;
BEGIN
del_rows := fnd_log_admin.delete_all;
DBMS_OUTPUT.PUT_LINE(del_rows || ' rows deleted');
END;

Viewing Log Messages

This section summarizes the different user interfaces that can be used to view and work with log messages, and how to access log messages from each UI.

CRM System Administrator Console

Navigate to Settings > System > Debug Logging.

Oracle Application Framework Pages

When working in Oracle Application Framework pages, you can use the following procedure to view log messages.

  1. Pages based on the Oracle Application Framework have a global button labeled Diagnostics. Click this button to open a window where you can choose Show Log. (Note that this "Diagnostics" global button does not refer to the Diagnostics feature in Oracle Applications Manager that enables management and execution of diagnostic tests.)

  2. Select Show Log to open the Logs page within Oracle Applications Manager. The Logs page is part of the System Alerts and Metrics feature.

    Note: For the Diagnostics global button to be visible, the profile option FND_DIAGNOSTICS must be set to YES.

Oracle Applications Manager

The Logging features in Oracle Applications Manager can be accessed in the following ways:

OAM gives you the capability to perform the following:

Access to the OAM Logging functionality is controlled using Oracle Application Object Library function security. The seeded responsibilities System Administration and System Administrator have the logging functions assigned. For other responsibilities, use the following:

Oracle Forms

Navigate to Help > Diagnostics > Logging.

Log Files in Applied Technology Products

The table below describes some of the log files used by Applied Technology products. These log files do not necessarily use the Logging Framework described above.

Note: For information on adop log files, refer to the section Patch Log Files.

Log Files in Applied Technology Products
Product User-friendly log filename or description Default log file name(s), if any (usually for log files not available in the UI) Log file location and/or navigation path For more information, see:
Oracle Alert Action Log. This log shows the text of the action, if the action is a message action, operating system script, or SQL statement script action that is defined in Oracle Alert.   Review Alert History form > Find Actions button > Action Log button Reviewing Action History, Oracle Alert User's Guide
Oracle Alert Reply Log   Choose the Reply Log button to open a window and display response log. (Review Alert History form > Find Actions button > Response > Reply Log) Reviewing Action History, Oracle Alert User's Guide
Oracle Alert Request Log. This allows you to view the complete log file of the check request.   Review Alert History form > Find Check button > Choose Request Log from the Tools menu Reviewing Alert Check Information, Oracle Alert User's Guide
Oracle Application Framework error.log / jserv.log ( An Apache/JServ log file that identifies if any problems occur when starting the JVM). error.log or jserv.log Accessible through the Quik Apache configuration page. Oracle Application Framework Developer's Guide, available from My Oracle Support Document 1315485.1.
Oracle Application Framework fnd.log, for FND logging at the application tier. fnd.log /tmp/fnd.log Oracle Application Framework Developer's Guide, available from My Oracle Support Document 1315485.1.
Oracle Application Object Library - Concurrent Processing Concurrent Request log file l<request ID>.req Default is $APPLCSF/$APPLLOG. But additional options available; seeLog and Output File Names and Locations, Oracle E-Business Suite Setup Guide. Log and Output File Names and Locations, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Concurrent Processing Host Language Concurrent Program FCP_LOG Same as above Host Language Concurrent Programs, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Concurrent Processing Internal Concurrent Manager Log File <mgrname.mgr> Default is $APPLCSF/$APPLLOG. But see Log and Output File Names and Locations, Oracle E-Business Suite Setup Guide for additional option.
UI: Concurrent Processes window > Internal Manager Log, OAM > Site Map > Administration > Request Processing Managers > [Service] > View Processes > ICM Log (B)
Controlling the Internal Concurrent Manager from the Operating System, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Concurrent Processing Concurrent Manager log file w<number>.mgr Same as ICM , or Concurrent Requests window > Manager Log Log and Output File Names and Locations, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Concurrent Processing Internal Monitor process log i<number>.mgr Same as ICM log Concurrent Processes Window, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Concurrent Processing ICM Activation/Deactivation Logs CM_<SID>.log and CS_<SID>.log $FND_TOP/$APPLLOG Setting Up, Starting, and Shutting Down Concurrent Managers, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Concurrent Processing FRD log file NA GUI: OAM UI - "Forms Sessions for Process ID" > View Diagnostics OAM Generic Collection Service, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Printing (Pasta) Pasta error log file User-defined User-defined Configuration File Options, Oracle E-Business Suite Setup Guide and Command Line Parameters, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Tablespace Migration Utility (OATM) Log file for the generation of migration commands. fndgmcmd <timestamp>.log Created in the working directory from which the user runs the PERL program. Phase 1: Preparatory Steps, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Tablespace Migration Utility (OATM) Log file for the migration of tables with LONG columns. fndmlong<timestamp>.log Created in the working directory from which the user runs the PERL program. Phase 2: Migration Steps, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Tablespace Migration Utility (OATM) Log file for the process to execute the script fndemseq.sql. fndemseq<timestamp>.log Created in the working directory from which the user runs the PERL program. Phase 2: Migration Steps, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Tablespace Migration Utility (OATM) Log file for the execution of execute the SQL script fndemcmd.sql fndemcmd<timestamp>.log Created in the working directory from which the user runs the PERL program. Phase 2: Migration Steps, Oracle E-Business Suite Setup Guide
Oracle Application Object Library - Tablespace Migration Utility (OATM) Log file for the process for enabling all the constraints, triggers, policies and start queues. fndenabl<timestamp>.log Created in the working directory from which the user runs the PERL program. Phase 3: Post-Migration Steps, Oracle E-Business Suite Setup Guide
Oracle Applications Manager Forms Runaway Processes NA Site Map > Monitoring (subtab) > Current Activity (heading) > Forms Runaway Processes (link) Overview Additional Monitoring Features and Options
Oracle Applications Manager Oracle Applications Manager log file   Navigation: Site Map > Administration > Applications Manager Log (under Others) Oracle Applications Manager Log
Oracle E-Business Suite Integrated SOA Gateway Design-time Logs, recorded during service generation and deployment life cycle for an interface that has the design-time log enabled.   Accessible through the Integration Repository user interface. Logging for Web Services, Oracle E-Business Suite Integrated SOA Gateway Implementation Guide
Oracle E-Business Suite Integrated SOA Gateway Runtime Logs, recorded during the invocation of Oracle E-Business Suite services by Web service clients.   These logs are captured and viewed through the Service Monitor user interface. Monitoring and Managing SOAP Messages Using Service Monitor, Oracle E-Business Suite Integrated SOA Gateway Implementation Guide
Oracle E-Business Suite CRM Technology Foundation (JTT) Page Flow Logging reports NA Settings tab > System > Properties > Page Flow Logging > Reports Viewing Page Flow Logging Reports, Oracle E-Business Suite CRM System Administrator's Guide
Oracle iSetup Extract Log File NA Migrations > Extract > View Log Viewing an Extract, Oracle iSetup User's Guide
Oracle iSetup Transform Log File NA Transforms > Extract > View Log Viewing a Transform, Oracle iSetup User's Guide
Oracle Report Manager Logs for Oracle Report Manager concurrent requests   Access through UI. Use standard concurrent processing UI or Oracle Report Manager: Home > Completed Requests > Details icon > (B) View Log Report Manager Home Page, Oracle Report Manager User's Guide
Oracle Web Applications Desktop Integrator Oracle Web Applications Desktop Integrator log bne.log or value specified in BNE Server Log Filename profile option FND_TOP/log or value specified in BNE Server Log Path profile option Setting Profile Options, Oracle Web Applications Desktop Integrator Implementation and Administration Guide
Oracle Workflow Oracle Workflow Builder log wfbldr.log, if View menu > Log > To File is selected If View menu > Log > To File is selected, then the log file is stored in the Oracle home on the client PC where Oracle Workflow Builder is installed, ORACLE_HOME\WF\DATA\us\wfbldr.log; or access through the Oracle Workflow Builder UI: View menu > Log > Show Oracle Workflow Builder Menus, Oracle Workflow Developer's Guide
Oracle Workflow Log of command-line diagnostic tests for notification mailers when you run the tests using oracle.apps.fnd.wf.mailer.Mailer. test.log or name specified in –Dlogfile parameter Directory from which the diagnostic tests are run. Running Command-Line Notification Mailer Diagnostics, Oracle Workflow Administrator's Guide
Oracle Workflow SQL trace file for an Oracle Workflow Business Event System agent listener, if you enable SQL tracing for the agent listener using the SQL_TRACE_LEVEL parameter. <INSTANCE>_ora_<PID>_WFAL_<componentId>_<timestamp>.trc. For example: WF11G_ora_254_WFAL_10002_20100302.trc The location specified in the USER_DUMP_DEST parameter as listed in the V$PARAMETER view. Scheduling Listeners for Local Inbound Agents, Oracle Workflow Administrator's Guide
Oracle Workflow Logs for Oracle Workflow service component containers. The log file names are determined by Oracle E-Business Suite Logging Framework properties or profile options, if written to a file. Either written to the Generic Service Management log file or to the log file location specified in your Oracle E-Business Suite Logging Framework properties or profile options. View through Oracle Applications Manager UI, from the Service Components page or Component Details page. Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Service Components status icon > (B) View Log or Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Service Components status icon > (B) View Details icon > (B) View Log Service Components
Oracle Workflow Logs for Workflow Background Process concurrent requests.   Access through UI: Use standard concurrent processing UI or Oracle Applications Manager, from the Background Engines page. Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Background Engines status icon > (B) View Log Engines
Oracle Workflow Logs for Purge Obsolete Workflow Runtime Data concurrent requests.   Access through UI. Use standard concurrent processing UI or Oracle Applications Manager, from the Workflow Purge pages. Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Purge status icon > Request Log link or Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Purge status icon > (B) View Purge Requests > (B) View Log Purging Workflow Data
Oracle Workflow Logs for Workflow Control Queue Cleanup concurrent requests.   Access through UI. Use standard concurrent processing UI or Oracle Applications Manager, from the Control Queue Cleanup page. Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Control Queue Cleanup status icon > (B) View Log Workflow Control Queue Cleanup