« Close

Datasheets and User Guides

App Notes

Software & Driver

 

2.7.1 - Log

Saves a message of the specified severity level to the LJM debug log file.

Syntax

LJM_ERROR_RETURN LJM_Log(
                      int Level, 
                      const char * String)

Parameters

Level [in]
The error severity level of this new log entry. See constants file LJM_DEBUG_LOG_LEVEL.
  • LJM_STREAM_PACKET = 1
  • LJM_TRACE = 2
  • LJM_DEBUG = 4
  • LJM_INFO = 6
  • LJM_PACKET = 7
  • LJM_WARNING = 8
  • LJM_USER = 9
  • LJM_ERROR = 10
  • LJM_FATAL = 12
String [in]
The debug message to write to the log file.

Returns

LJM errorcodes or 0 for no error.

Remarks

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.

Examples

[C/C++] Write "Beginning stream..." to the log file with severity level: Debug.

int LJMError;
LJMError = LJM_Log(4, "Beginning stream...");