Manage log files

This topic describes the log files generated during synchronizations, that record the activity of the various connection runs.

Log file names

During installations and upgrades, three log files are generated in the <MFConnect_installdir/AppData folder: log4j2.xml, log4j2-template.xml, and logback-template.xml.

The default log4j2.xml file performs error logging, the lowest logging level.

Under normal circumstances, none of these log files are required to run a synchronization, and they may safely be removed. If there are no xml files in the AppData folder, nothing is logged in the logs folder. This may be useful if you have disk space constraints.

In the utilities subfolder, three additional log files are generated, corresponding to the logging level:

  • For Windows:,,and
  • For Linux: log4j2.error.ux.xml,,and log4j2.trace.ux.xml.

Log file storage location

The actual logs with the runtime information are stored in the <MFConnect_installdir/AppData/logs folder. Due to the large volume of the log information generated, the log files are archived in the log folders as .gz or .zip files.

To change the default log file storage location:

Open the log4j2.xml file in the <MFConnect_installdir/AppData folder.

Make the following change: <Property name="logsDir">../../AppData/logs</Property>

Define the logsDir parameter.

Note: If you change the log location, scheduled nightly purges do not delete these logs. We do not recommend retaining historical logs, since you can retrieve all significant information from the audit and data folder backups.

If you need to store the logs on a drive other than the local C drive, periodically copy the contents of the backup folder to the new storage location. This folder's contents include a backup of the database and a denormalized flat file representation of the audits. The copied files provide you with a complete audit of your synchronization.

Back to top

Logging levels

Micro Focus Connect supports three levels of logging:

Log level Details Relevant log file

The lowest logging level, that produces the least amount of information. This is the default level as generated by the installer.

Disk space usage: Low

  • For Windows:
  • For Linux: log4j2.error.ux.xml.

The average logging level. It reports all of the runtime information about the synchronizations.

Disk space usage: Medium

  • For Windows:
  • For Linux:

The highest logging level. It reports all of the runtime information about the synchronizations, including REST API calls to the endpoint systems, raw data returned, and error messages with a full stack trace.

This level is useful for a temporary trace, typically in conjunction with a support engineer, to capture the information required to raise defects. After the logs are collected, you are typically requested to run a purge. For details, see Batch utility scripts.

Disk space usage: High. This level significantly increases the amount of disk space utilized. Therefore, it should only be used for a short, controlled period of time.

  • For Windows:
  • For Linux: log4j2.trace.ux.xml.

The log level is controlled by the type of log4j2.xml file that is stored in the c:/program files/micro focus/connect/AppData folder. For details, see Enable logging.

Back to top

Enable logging

Logs are only generated when the log4j2.xml file is detected in the <MFConnect_installdir/AppData folder. By default, this file is added to the AppData folder during installation at the error logging level.

To enable logging or to modify a logging level:

  1. Decide on a logging level, as described in Logging levels.
  2. Copy the relevant file from the <MFConnect_installdir/utilities folder to the AppData folder. For example, to enable trace logging on a Windows machine, copy to the AppData folder.
  3. Rename the file that you copied over, to log4j2.xml.
  4. Run the synchronization.

Back to top

Turn off logging and remove logs

This section describes how to suspend the generation of logs and remove existing logs, in order to clear disk space.

To disable logging and clear the disk space:

  1. In the <MFConnect_installdir/AppData folder, delete the log4j2.xml file.
  2. In the <MFConnect_installdir/AppData/logs folder, delete all .xml files with a log prefix. Use this expression: log*.xml. Also delete any .gz or .zip files.
  3. Run the script, Purge, as an administrator. For details, see Batch utility scripts. If the Purge script is run on a scheduled basis, all logs are automatically deleted based on that schedule.

    Tip: It is recommended that you run the purge as a nightly task. For details, see Purge files on Windows as a nightly task.

Back to top

Purge files on Windows as a nightly task

By default, all logs and audit reports are purged every 24 hours. The older records are saved as .csv files. On-premises users can delete these file manually. SaaS users can configure the system to remove these files at a given interval.

This section describes how to manually create a scheduled task for purging data on a Windows machine.

To set up the nightly task on Windows:

  1. From the Start menu, search for Task Scheduler. Right click and select Run as administrator.
  2. In the right pane, click Create Basic Task.
  3. In the Create Basic Task, provide a name and description for the task. Click Next.
  4. In the Trigger page, select Daily. Click Next.
  5. In the Trigger > Daily page:

    1. Provide a start date and time. Choose an off-peak time when system usage is low.
    2. Enter Recur every 1 days.
    3. Click Next.
  6. In the Action page, select Start a program. Click Next.
  7. In the Action > Start a Program page:

    1. Enter mfcpurge.bat into the Program/script box. Do not include the full path.
    2. In the Start in (optional) box, enter the complete path to the <MFConnect_installdir/Utilities folder, without quotations.
    3. Click Next.
  8. In the Finish page, enable the option: Open the Properties dialog for this task when I click Finish. Click Finish.
  9. In the Purge Properties dialog box, click Change User or Group.
  10. In the Select User or Group dialog box, enter SYSTEM into the Enter the object name to select box. Click Check Names. SYSTEM becomes underlined. Click OK.
  11. In the Micro Focus Connect Purge Properties dialog box, enable Run with the highest privileges. Click OK.

The purge task is now configured to run nightly.

For details, see Batch utility scripts.

Back to top

Gather debug information

This section describes how to gather debug information to submit to technical support.

By default, the Error logging level is used. To debug an issue, you may need a higher level of logging known as the Trace level. For details, see Logging levels.

To gather a trace level logs and their associated data:

  1. Connect to the Micro Focus Connect server machine as an Administrator.
  2. Open an escalated (Run as Administrator) command prompt.
  3. Change directory to the <MFConnect_installdir\Utilities directory.
  4. Run the StopAllConnections script to stop all connections, or log into the machine and manually stop all connections. For details, see Start or stop a connection.
  5. Run services.msc to open the Services manager and stop the Micro Focus Connect Web Server service.
  6. Delete log4j2.xml file typically under <MFConnect_installdir\AppData.
  7. Copy from <MFConnect_installdir\Utilities to <MFConnect_installdir\AppData.
  8. Rename <MFConnect_installdir\AppData\ to log4j2.xml.
  9. In your escalated command prompt: Run <MFConnect_installdir\Utilities\mfcPurge.bat
  10. Log in to Micro Focus Connect.
  11. Reproduce the issue that you want to debug, using only the affected data source or connection. If you are debugging a connection, we recommend using the Run one iteration option.
  12. Run services.msc to open the Services manager and stop the Micro Focus Connect Web Server service.
  13. Create a zip file containing the entire contents of the following directories:



  14. Provide the above zip file to OpenText support.

Revert to the default logging level

Running iterations with the of Trace logging level is not recommended for ordinary usage, as it consumes a large amount of disk space. This can use up your available storage, causing system instability. Therefore, we recommend reverting back to Error logging level after submitting your trace files to support.

To revert to the Error logging level:

  1. Delete <MFConnect_installdir\AppData\log4j2.xml
  2. Copy <MFConnect_installdir\Utilities\ to C:\Program Files\Micro Focus\Connect\AppData\
  3. Rename <MFConnect_installdir\AppData\\ to log4j2.xml.
  4. Run <MFConnect_installdir\Utilities\mfcPurge.bat as an administrator.
  5. Start any required connections which were stopped during the above steps.

Back to top