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.
Logs with release DLLs
Starting with the 2.6 version, you can collect logs with release DLLs of the SDK. With this version, you have specific DLLs in the installer of the SDK - Medialooks.MLLog.x64.dll and Medialooks.MLLog.x86.dll.
Once the MLLog DLL is registered on a machine where you have a problem, you have the following branch 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
It contains the following properties:
Name | Default value | 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 a name of a DLL 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.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.verbosity | 0 |
Log level. Possible values:
|
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.
Hot logging
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.
As you already know, Medialooks.MLLog.x86.dll and Medialooks.MLLog.x64.dll modules (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's 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.
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 as described on the below screenshot, and the debug logs will be collected automatically.
If you work with the deployed application and computer doesn't have the installed SDK, you can paste Medialooks.MLLog.x86.dll and Medialooks.MLLog.x64.dll in the same folder where the exe file of your application is located. 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 dll, separate from your application's exe file, you need to register MLLog DLLs using regsvr32 utility.
For your convenience, two .reg files for enabling and disabling log collection are attached.