Saturday, September 22, 2012

JDeveloper: Ability to perform ODL log analysis

A possibly lesser known feature of JDeveloper is its ability to perform ODL(Oracle Diagnostic Log) log analysis, known as the Oracle Diagnostic Log Analyzer.

This feature allows you to open a diagnostics log file (or use the log file currently in the Log window in JDeveloper) and do a limited yet useful log analysis. For the Standalone WebLogic Server, diagnostics log files are produced by applications running on the specific WebLogic Server instance.

The log files are produced and saved by WebLogic in a directory configured by the WebLogic administrator. This directory defaults to the logs directory under the servers directory for the specific server instance; that is, for a server instance called ManagedServer1 they can be found in servers/ManagedServer1/logs.

The servers directory is located under the specific domain directory. In this blog, we will see how to analyze a diagnostics log produced when running an ADF Fusion web application on a Standalone WebLogic Server. Alternatively, you can run the application in JDeveloper and analyze the log produced in the Log window.

Getting ready
You will need a Standalone WebLogic Server domain configured and started. You will also need your Fusion web application deployed to the Standalone WebLogic Server.

How to do it…
  1. Run the application deployed on the Standalone WebLogic Server, so that a diagnostics log file is generated. Alternatively, if you already have a diagnostics log file to analyze, you can ignore this step.

  2. In JDeveloper, select Tools | Oracle Diagnostic Log Analyzer from the main menu.

  3. Click on the Browse Log Files button (the search icon) to locate the diagnostics file and open it.

  4. Click on the By Log Message tab and specify the search criteria in the Search section. Press the Search button to commence with the search.

  5. In the Results table, click on a value inside the Related column for a log entry of interest and select Related By Request from the context menu.

How it works…
Steps 1 through 5 give the details of the process of analyzing a diagnostics log file using the Oracle Diagnostics Log Analyzer feature in JDeveloper.

The Oracle Diagnostics Analyzer is accessible via the Tools | Oracle Diagnostic Log Analyzer menu selection. Once started, you will need to load the specific diagnostics log file to analyze. We have done this in step 3.

You can search the diagnostics log entries using either the By ADF Request or the By Log Message tab and specifying the search criteria. The By ADF Request tab will display only the log entries related to ADF requests made when a page is submitted.

On the other hand the By Log Message tab will search all log entries in the log file by their log level. Moreover, the search criteria in both tabs allow you to search for diagnostic log entries based on their Log Time and based on the message content (Message Id, User, Application, Module, and so on).

The results of the search are displayed in the Results table. The results data are sortable by clicking on the column headers. To display all related log entries, click inside the Related column for a log entry of interest and select any of the choices available in the context menu.

These choices are:
  1. Time:
    Filter diagnostic log entries to view all log entries leading up to the specific entry. You can refine the time before the entry using the dropdown.

  2. Request:
    Filter diagnostic log entries to view all log entries for the same web request.

  3. ADF Request:
    Switches to the By ADF Request tab to display the diagnostic log entries in a hierarchical arrangement to show their execution dependencies.

1 comment :

  1. Good post. Log analysis is essential when troubleshooting implementation issues. I think this log analyzer would be better if it could not only search logs but also tail them, like dedicated log analyzers can, such as Retrospective by centeractive or some others.