Manage log files

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

Log file names

When Micro Focus Connect is installed or upgraded, it generates three log files in the c:/program files/micro focus/connect/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, Micro Focus Connect will not log anything in the logs folder. This may be useful if you have disk space constraints.

In the utilities subfolder, Micro Focus Connect generates three additional log files, corresponding to the logging level:

  • For Windows installations:,,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 c:/program files/micro focus/connect/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 c:/program files/micro focus/connect/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 Micro Focus Connect synchronizations.

Disk space usage: Medium

  • For Windows:
  • For Linux:

The highest logging level. It reports all of the runtime information about Micro Focus Connect 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 Micro Focus Connect 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

Micro Focus Connect only generates logs when it detects the log4j2.xml file in the c:/program files/micro focus/connect/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 c:/program files/micro focus/connect/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 c:/program files/micro focus/connect/AppData folder, delete the log4j2.xml file.
  2. In the c:/program files/micro focus/connect/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

Micro Focus Connect cleans up all logs and audit reports 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 Micro Focus Connect 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 Micro Focus Connect 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, Micro Focus Connect uses the Error logging level. 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 Micro Focus Connect Utilities directory, by default C:\Program Files\Micro Focus\Connect\Utilities.
  4. Stop all connections. Run the StopAllConnections script, or log into Micro Focus Connect 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 C:\Program Files\Micro Focus\Connect\AppData.
  7. Copy from C:\Program Files\Micro Focus\Connect\Utilities to C:\Program Files\Micro Focus\Connect\AppData\.
  8. Rename C:\Program Files\Micro Focus\Connect\AppData\ to log4j2.xml.
  9. In your escalated command prompt: Run C:\Program Files\Micro Focus\Connect\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:

    C:\Program Files\Micro Focus\Connect\AppData\data

    C:\Program Files\Micro Focus\Connect\AppData\logs

  14. Provide the above zip file to OpenText support.

Revert to the default logging level

Running Micro Focus Connect 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 the Error logging level after submitting your trace files to support.

To revert to the Error logging level:

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

Back to top