Browse
 
Tools
Rss Categories

LV_SRE_RegisterAppLogMsg

Reference Number: AA-00717 Views: 7009 0 Rating/ Voters

Registers an application level log message callback.

Function

  • void LV_SRE_RegisterAppLogMsg(ExportLogMsg log_callback, void *user_data, int verbosity)

Parameters

log_callback

Pointer to a function which will receive logging information.

user_data

user_data is a void pointer to application-defined data. This data will be passed to the log_callback function to identify the application.

verbosity

range: 0 - 20

0: minimal logging info

1 - 19: logging levels used for specific issues; usually specify either 0 or 20.

20: maximum logging info

Remarks

This function is used in addition to the port log message callback, because some log messages are generated while not associated with any single port.

C Code

  1. LV_SRE_RegisterAppLogMsg(LogMsg, NULL, LoggingVerbosity);

  2. // For instance, this function call points to the following function
  3. // defined elsewhere in the program:
  4. void LogMsg(const char* msg, void* UserData)
  5. {
  6. fprintf(stdout, "%s\n", msg);
  7. fflush(stdout);
  8. }

See Also