LJM_DEBUG_LOG_FILE is a string-based readable-writable LJM library configuration which sets the absolute or relative path of the file to output log messages to.
The constant LJM_DEBUG_LOG_FILE can be used interchangeably with the string "LJM_DEBUG_LOG_FILE".
The configuration value of LJM_DEBUG_LOG_FILE is meaningless if LJM_DEBUG_LOG_MODE is in LJM_DEBUG_LOG_MODE_NEVER (which is the default).
See these debug logger parameters, especially LJM_DEBUG_LOG_MODE.
To read LJM_DEBUG_LOG_FILE, use LJM_ReadLibraryConfigStringS.
To write LJM_DEBUG_LOG_FILE, use LJM_WriteLibraryConfigStringS or LJM_LoadConfigurationFile.
For more information, see 2.7 Debugging Functions.
[C/C++] Set LJM to log to the log file "ljm_monday.log"
char ErrorString[LJM_MAX_NAME_SIZE]; char DebugLogFile[LJM_MAX_NAME_SIZE]; int LJMError; printf("Setting LJM_DEBUG_LOG_MODE to LJM_DEBUG_LOG_MODE_CONTINUOUS\n"); LJMError = LJM_WriteLibraryConfigS(LJM_DEBUG_LOG_MODE, LJM_DEBUG_LOG_MODE_CONTINUOUS); if (LJMError != 0) { LJM_ErrorToString(LJMError, ErrorString); printf("LJM_WriteLibraryConfigS error: %s\n", ErrorString); } printf("Setting LJM_DEBUG_LOG_FILE to ljm_monday.log\n"); LJMError = LJM_WriteLibraryConfigStringS(LJM_DEBUG_LOG_FILE, "ljm_monday.log"); if (LJMError != 0) { LJM_ErrorToString(LJMError, ErrorString); printf("LJM_WriteLibraryConfigStringS error: %s\n", ErrorString); } LJMError = LJM_ReadLibraryConfigStringS(LJM_DEBUG_LOG_FILE, DebugLogFile); if (LJMError != 0) { LJM_ErrorToString(LJMError, ErrorString); printf("LJM_ReadLibraryConfigStringS error: %s\n", ErrorString); } printf("LJM_DEBUG_LOG_FILE is now %s\n", DebugLogFile);
Possible output:
Setting LJM_DEBUG_LOG_MODE to LJM_DEBUG_LOG_MODE_CONTINUOUS
Setting LJM_DEBUG_LOG_FILE to ljm_monday.log
LJM_DEBUG_LOG_FILE is now ljm_monday.log
For more LJM configurations, see Library Configuration Functions.