When you face a problem and our support team is unable to reproduce it on our side, we often ask you for a debug log.
Hot logging (2.8.1+ SDK version)
Starting from 2.8.1 version of the SDK, you can enable the collection of debug logs on the fly, without restarting your SDK-based application. This feature can be extremely useful when it's needed to collect the debug logs for a problem that are difficult to reproduce, or if they occur after the application has been running for a long time and collecting the debug logs from the very beginning is problematic due to their large size.
Specific DLLs - Medialooks.MLLog.x86.dll and Medialooks.MLLog.x64.dll (please do not rename them!) are responsible for logging. If you want to use the hot logging feature, such DLL must be located in the same folder next to Medialooks.Runtime module or next to the app .exe file.
By default, MLLog DLLs are located along these paths, depending on the bit depth:
- "C:\Program Files (x86)\Medialooks\Medialooks Common\x86\Medialooks.MLLog.x86.dll"
- "C:\Program Files (x86)\Medialooks\Medialooks Common\x64\Medialooks.MLLog.x64.dll"
In this case, the apps read the MLLog registry branch every 5 seconds. After the registry branch is configured for collecting the logs, the application begins collecting them until it closes or until the registry branch is deleted or reconfigured to stop collecting them. MLLog registry branch contains the following properties:
Name | Default | Description |
---|---|---|
log.files | 10 | Limits the number of LOG files collected from a single module in a target folder. |
log.modules |
Lists the modules to collect logs from: Use "all" to collect from all the DLLs. Use "mserver" to collect logs from external processes (decoding or encoding). Use DLL name to collect from a specific module, To collect logs from several modules at the same time, list them with a comma as a separator, e.g. "Plugin.CG, MFReader". Collect all DLLs logs example: Collect the logs for Medialooks.MFReader.dll and Medialooks.MFWriter.dll example: Collect the logs for Medialooks.File.dll and Medialooks.WriterFFM.dll example: |
|
log.path | Path to a folder to store the logs. If empty, the log is stored in the executable folder (where the main EXE is stored). | |
log.process_crash | false | Disable crash handler (to avoid try-catch crashes) |
log.roll | 100mb | Limits the file size of each log. Once a log reaches the limit, a new file is generated. Set 0 to disable the rolling. |
log.split_app_logs | false | Split application logs by modules |
log.split_mserver_logs | false | Split MServer logs by modules |
log.verbosity | 0 |
Log level. Possible values:
|
So, if you have the SDK installed on your computer, you don't need to perform any preparations to start collecting the debug logs for running SDK-based applications. Just apply the required changes to your registry and the debug logs will be collected automatically. For your convenience, two .reg files for enabling and disabling log collection are attached at the very bottom of this page.
But if you work with a deployed SDK-based application and the computer doesn't have the installed SDK, you can place Medialooks.MLLog.x86.dll or Medialooks.MLLog.x64.dll to the same folder with the application .exe file. This allows you collecting the debug logs without making any changes in your built application.
Only in case when you need MLLog DLLs to be in the same folder as Medialooks.Runtime.x86.dll or Medialooks.Runtime.x64.dll, separate from your application's .exe file, you need to register MLLog DLLs using regsvr32 utility or define the path to the MLLog DLL in a manifest file of your application.
Logs with release DLLs (2.6.0+ SDK version)
With older SDK versions (starting with the 2.6 version), you can collect logs with release DLLs of the SDK.
To do this you should register the MLLog DLL on the computer where the problem occurred, only after that the following branch appears in the system registry:
Computer\HKEY_CURRENT_USER\SOFTWARE\Medialooks\MFormats\MFFactory\MLLog
Please note, if you need to debug the Windows service application, you have to use:
Computer\HKEY_USERS\.DEFAULT\Software\Medialooks\MFormats\MFFactory\MLLog
They contain properties described in the above table. So, for example, you have a problem with a file playback. You can check the DLL name of an object -- either by checking the redistributed files or with a code like this:
myReader.PropsGet("dll-path", out string dllPath);
Then you might use a file name (e.g. "Medialooks.MFReader.x86.dll") or a shorter name of the file (without the "Medialooks." and "x86.dll") -- "MFReader", and use this as a value of the log.modules property. Then, set a path to a target folder with the log.path. Now you are good to go to collect the logs. Start your application, get the problem reproduced: at this moment, the logs should be available. Close the application, and share the logs with our support engineers.