LJM contains debug logging functionality that is disabled by default.
Once enabled, LJM will write messages to the LJM debug log file. These messages can contain error messages, warnings, raw packets, and other information.
LJM's debug logging can be enabled using one of two methods – via ljm_startup_configs.json or via LJM_WriteLibraryConfigS. Both methods (described below) require changing the following LJM configuration parameters:
Enabling via ljm_startup_configs.json
The file ljm_startup_configs.json contains the LJM configurations that are used by LJM when LJM is loaded.
Note that ljm_startup_configs.json is installed / replaced every time the LJM installer is run, so this method is temporary. LJM installs ljm_startup_configs.json to the following locations:
After opening ljm_startup_configs.json with a text editor, change the parameters as described above.
Enabling via LJM_WriteLibraryConfigS
Use the function LJM_WriteLibraryConfigS to change the LJM parameters as described above.
Saves a message of the specified severity level to the LJM debug log file.
LJM_ERROR_RETURN LJM_Log(
int Level,
const char * String)
LJM errorcodes or 0 for no error.
By default, LJM_DEBUG_LOG_MODE is to never log, so LJM does not output any log messages, even from this function. Users must first use LJM_WriteLibraryConfigS to change the log mode. See the library configuration functions.
[C/C++] Write "Beginning stream..." to the log file with severity level: Debug.
int LJMError; LJMError = LJM_Log(4, "Beginning stream...");
Clears all characters from the debug log file.
LJM_ERROR_RETURN LJM_ResetLog()
LJM errorcodes or 0 for no error.
See the LJM configuration properties for Log-related properties.
[C/C++] Clear the log file.
int LJMError; LJMError = LJM_ResetLog();