Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Gathering logs

M-Files External object type logging (onwards from version 19.7.8028.4)

Last updated on 11 February 2022

Admin
Connections to External Databases (Integrated)

Overview

In case you have issues when refreshing external object type, you can enable logging for external object types to get more information about the problem. This can be done in M-Files Admin tools -> 'Advanced Vault Settings' -> 'Configurations' -> 'Connection to External Databases'. These settings are valid onwards from version 19.7.8028.4.

Solution

In M-Files Admin tools, select vault -> 'Configurations' ->  'Advanced Vault Settings' -> 'Configuration' -> 'Connection to External Databases', select Advanced-tab and add following JSON-code: 

{

    "refreshLog": {

       "externalObjectTypeRefreshLogDir": "c:\\temp",

       "loggingEnabledForExternalObjectTypes": [161],

       "enableVerboseLoggingExternalObjectTypes": true

    }

}

Make sure that the folder designated in externalObjectTypeRefreshLogDir exists on the disk.

image.png

(loggingEnabledForExternalObjectTypes, this is the ID of external object type.)

Click 'Save'. Now check the Configuration-tab, it should look like this:

image.png

If you do not see the "Refresh Log" item, switch between the Configuration and Advanced tabs once more, or restart M-Files Admin.

The two articles linked at the end explain the expected behavior in detail. In case you still need help with the issue, please contact support@m-files.com and attach the logs.

Notes

Here are a few pieces of information that may be useful:

  • Additional logging
  • Enabling logging in M-Files Admin when there is already other configuration
  • More details on how external object refreshing works and what the timeouts mean

Additional Logging

As of version 21.9, the M-Files server logs also contain information about refreshes of external objects - they are on lines with the "<RefreshExtOT>" and "<EOT Refresh>" keyword. You can enable them with the following registry settings (values are hexadecimal):

[HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFServer\Logging]

"Enabled"=dword:00000001

"EnableVerboseLogging"=dword:00000111

"LogCategories"=dword:00002008

and those logs will be in %TEMP%\MFilesLogs which is typically C:\Windows\Temp\MFilesLogs

Enabling logging in M-Files Admin when there is already other configuration

To enable the logs from the M-Files Admin, when you already have some configuration in place, add the "refreshLog" object at the root level of the configuration at the bottom. 

For example, this snippet already has custom refresh timeouts defined for some Object Types and the refreshLog object is placed after it, with a preceding comma to ensure valid JSON syntax:

{

            "objectTypes": [

                        {

                                    "objType": "OT.ExtProspect",

                                    "timeoutFullRefresh": 500,

                                    "timeoutQuickRefresh": 120,

                                    "arrayElementGuid": "21ce2aa5-0a44-4db7-b153-e9e4b53eba99"

                        }

            ],

            "refreshLog": {

                        "externalObjectTypeRefreshLogDir": "c:\\temp",

                        "loggingEnabledForExternalObjectTypes": [

                                    200

                        ],

                        "enableVerboseLoggingExternalObjectTypes": false

            }

}

More details on how external object refreshing works and what the timeouts mean

The following two resources explain in more detail how and when external objects are refreshed, what triggers those refreshes and what the timeout settings control. Reviewing them can provide clarity on the expected behavior to compare with the observed behavior, and there are also additional details in the larger document:

Still need help?