Configuring Logging Using the Configuration File

You can also configure add-in logging using the ADF Desktop Integration configuration file. This file captures different types of information such as ThreadId, ProcessId, and DateTime as well as logging level.

Set logging through the configuration file if you want to capture log information that spans one or more integrated Excel workbook restarts and/or you want to configure a lower logging level than verbose.

The configuration file is saved as adfdi-excel-addin.dll.config. To determine the correct file name and location, click the About button in the Workbook group of the Oracle ADF tab. In the dialog that opens, click the Properties tab, and review the Configuration entry for file name and location of configuration file.

This example shows a sample configuration file that includes add-in logging settings for a adfdi-common-excel.xml log file.

<?xml version="1.0"?>
<configuration>
  <system.diagnostics>
    <sources>
      <source name="adfdi-common" switchValue="Verbose">
        <listeners>
          <add type="System.Diagnostics.XmlWriterTraceListener"
            name="adfdi-common-excel.xml"
            initializeData="c:\logs\adfdi-common-excel.xml"
            traceOutputOptions="ThreadId, ProcessId, DateTime"/>
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
</configuration>

Refer to Table A-2 for descriptions of the different log levels that you can enable for add-in logging.

For information about elements of the configuration file, see the Configuration File Schema for the .NET Framework section in Microsoft Developer Network documentation. For information about trace and debug settings, see the Trace and Debug Settings Schema section in Microsoft Developer Network documentation.

Note:

If necessary, you can also set the location and logging level using user environment variables. See Configuring Logging Using User Environment Variables.

About the adfdi-common Object

The adfdi-common object is an instance of the TraceSource class from the System.Diagnostics namespace in the Microsoft .NET Framework. This object is used to generate log files that capture information about events triggered by the Excel workbook that you integrate with your Fusion web application. To know the location of the log file, check the Log Files attribute in the Properties tab of the About dialog.

For information about the TraceSource class, see Microsoft Developer Network documentation.

Configuring Logging Using User Environment Variables

If you don't have access to the directory that stores the ADF Desktop Integration configuration file, you can change the location where log files are saved and the logging level by setting values for user environment variables.

You can add two user environment variables to configure the logging level and location for XML log files.

For information, see the How To Obtain Log Files For ADF Desktop Integration document that you can retrieve from My Oracle Support (https://support.oracle.com) if you search for Doc ID 2012985.1.

Tip:

Be sure to exit Excel completely prior to configuring the environment variables.

To add or configure user environment variables on Windows:

  1. Select the Windows Start button, then select Settings.
  2. From Settings, type Advanced System Settings in the Find a setting field on the left navigation pane to open the System Properties dialog.
  3. From the Advanced tab, click Environment Variables.
  4. In the Environment Variables dialog, click New under the User variables for <user name> input field, and add variables as described in the Table A-3.

    Table A-3 User Environment Variables to Configure Logging

    Enter a variable named... With a value...

    adfdi-common-file

    That defines the directory path and file name for the XML file that captures logging information.

    The directory that you specify here must exist before you run Excel. The generated log file will be in XML format.

    adfdi-common-level

    That specifies the level of logging. Table A-2 lists valid values.

  5. Click OK.