Configure Oracle Diagnostic Logging for IntegratedWebLogicServer

If you are not able to easily find the error in your application, you can use the Oracle Diagnostic Logging to investigate where your application failure occurs. The Oracle Diagnostic Logging Configuration editor configure the logging levels specified in the logging.xml file. The file can be configured at any time, even while the application is running in JDeveloper. Using the Oracle Application Development Framework Documentation (42.6 Using the ADF Logger), let’s configure Oracle Diagnostic Logging for IntegratedWebLogicServer.

In Application Servers window, right-click the IntegratedWebLogicServer and choose Configure Oracle Diagnostic Logging for IntegratedWebLogicServer, to open the logging.xml file.

configure-oracle-diagnostics-logging-for-integratedweblogicserver1

You can find the logging.xml file here:

# Linux
/<username_folder>/.jdeveloper/<jdev_system_folder>/DefaultDomain/config/fmwconfig/servers/DefaultServer

# Windows
C:\Users\<username_folder>\AppData\Roaming\JDeveloper\<jdev_system_folder>\DefaultDomain\config\fmwconfig\servers\DefaultServer

By default, the level is set to WARNING for all Oracle loggers.
The Java logging system supports the following log levels:

  • SEVERE (most restrictive, highest log level)
  • WARNING
  • INFO
  • CONFIG (the highest low level supported for Oracle ADF)
  • FINE
  • FINER
  • FINEST (least restrictive, lowest log level)

Expand the Root Logger (default) and oracle nodes.
Set the level of oracle.adfdiagnostics to “FINE”, to log events generated by source code for the ADF Model, ADF Controller, ADF Business Components, and Oracle ADF internal classes. Do not configure a Java log level that is more restrictive than CONFIG.

configure-oracle-diagnostics-logging-for-integratedweblogicserver2

Run the application.
To log an Entity DML event, create a new employee and click Commit.

configure-oracle-diagnostics-logging-for-integratedweblogicserver3

To analyze the log, use Oracle Diagnostic Log Analyzer.
In the Main menu, choose Tools > Oracle Diagnostic Log Analyzer.
In the Oracle Diagnostic Log Analyzer editor, select By Log Message option.
Filter the log by this ADF event message: Entity DML.

configure-oracle-diagnostics-logging-for-integratedweblogicserver4

Select Related by ADF Request in the Related column of the Results panel, to display the By ADF Request page with the ADF event messages arranged hierarchically, to show their execution dependencies.

configure-oracle-diagnostics-logging-for-integratedweblogicserver5

configure-oracle-diagnostics-logging-for-integratedweblogicserver6

You can also use these additional ADF event messages to filter log:

  • Executing iterator binding
  • Executing method binding
  • Execute query
  • Refreshing binding container
  • Attaching an iterator binding to a datasource
  • Converting rows into hierarchical nodes
  • Estimated row count
  • Get LOV list
  • Filter LOV list
  • Validate Entity
  • Lock Entity’s Parent
  • Lock Entity
  • Before posting the entity’s changes
  • Posting the entity’s changes
  • Posting in batches
  • Before committing the entity’s changes
  • After committing the entity’s changes
  • Before rolling back the entity’s changes
  • After rolling back the entity’s changes
  • Entity notifying an event
  • Entity notification name
  • Removing Entity
  • Updating audit columns
  • Applying Effective Date change
  • Entity DML
  • Entity read all attributes
  • Create Application Module
  • Create nested Application Module
  • Passivating Application Module
  • Activating Application Module
  • Establish database connection
  • Commit transaction
  • Rollback transaction
  • Validate transaction
  • Validate value
Waslley Souza

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

2 thoughts on “Configure Oracle Diagnostic Logging for IntegratedWebLogicServer”

  1. Hi Waslley Souza ,

    Thanks for the nice post. I have small doubt “how can we get / write these log files to our own specified file created by system date”. can you please help me on this.

    Best Regards,
    Raju

    1. Raju,

      you can create a log handler like this:

      <log_handler name='my-odl-handler' class='oracle.core.ojdl.logging.ODLHandlerFactory' filter='oracle.dfw.incident.IncidentDetectionLogFilter'>
         <property name='path' value='${domain.home}/servers/${weblogic.Name}/logs/myApplicationLog.log'/>
         <property name="rotationFrequency" value="daily"/>
         <property name='encoding' value='UTF-8'/>
         <property name='useThreadName' value='true'/>
        </log_handler>
      

      and add it to default’s logger as a handler.

      <logger name='' level='WARNING' useParentHandlers='true'>
         ...
         <handler name='my-odl-handler'/>
        </logger>
      

      If you only need ADF logs in this file, you can change the oracle.adfdiagnostics logger:

      <logger name='oracle.adfdiagnostics' useParentHandlers='true' level="FINE">
        <handler name='my-odl-handler'/>
      </logger>
      

      this way, you will have an log file per day

Leave a Reply

Your email address will not be published. Required fields are marked *