ADF Desktop Integration Server Logging

About

In my last blog, I have discussed on how to enable logging on ADFdi client. Here let us see on how to enable server-side logging to obtain detailed error stack.

Adding log-handler and logger for desktop integration

In <JDEV_HOME>\jdeveloper\system<version>\DefaultDomain\config\fmwconfig\servers\DefaultServer\logging.xml file, add log-handler for desktop integration by copying below code inside <log-handlers>.

<!-- The log handler for ADFdi -->
<log_handler name="oracle-adf-desktopintegration-logging-handler" class="oracle.core.ojdl.logging.ODLHandlerFactory">
<property name="path" value="../log/adfdi/msglogging"/>
<property name="maxFileSize" value="10485760"/>
<property name="maxLogSize" value="104857600"/>
<property name="encoding" value="UTF-8"/>
</log_handler>

Note: Provide valid value for path property.

Loggers can be added for below packages

  • All ADF Desktop Integration server logic: name = oracle.adf.desktopintegration
  • ADF Desktop Integration HTTP filter: name = oracle.adf.desktopintegration.filter

oracle.adf.desktopintegration: This package generates logs for all Servlet logic(DIRemoteServlet) and Download filter logic(DIExcelDownloadFilter) of ADFdi.

In logging.xml, inside <loggers>, comment the existing logger for oracle.adf.desktop.integration.
Eg: <!--logger name='oracle.adf.desktopintegration' useParentHandlers='true'/-->

Add new logger by copying below code inside <loggers> tag.

<!-- The logger for ADFdi -->
<logger name="oracle.adf.desktopintegration" level="INFO">
<handler name="oracle-adf-desktopintegration-logging-handler"/>
</logger>

Different Levels:

INFO : Information, warning and error messages will be logged into the log file present in the specified path.
WARNING: Only warning and error messages will be logged.
ERROR: Only error messages will be logged.
FINE/FINER/FINEST: More detailed log messages can be obtained by setting these levels.

oracle.adf.desktopintegration.filter: This package generates logs only for Download filter logic(DIExcelDownloadFilter) of ADFdi.

In logging.xml, inside <loggers>, comment the existing logger for oracle.adf.desktop.integration.
Eg: <!--logger name='oracle.adf.desktopintegration' useParentHandlers='true'/-->

Add new logger by copying below code inside <loggers> tag.

<!-- The logger for ADFdi -->
<logger name="oracle.adf.desktopintegration.filter" level="FINE">
<handler name="oracle-adf-desktopintegration-logging-handler"/>
</logger>

Different Levels:

INFO: Logs only two messages- one at startup and one at termination of Excel Download Filter.
FINE/FINER/FINEST: Detailed logs can be obtained by setting these levels.

After adding loggers or changing levels for loggers, weblogic server has to be restarted for changes to get effected.
To configure loggers while the application is running in Integrated Weblogic server, see the "Using the ADF Logger" section in Developing Fusion Web Applications with Oracle Application Development Framework.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips and Tricks from Oracle's JDeveloper & ADF QA

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today