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
- LV_SRE_RegisterAppLogMsg(LogMsg, NULL, LoggingVerbosity);
// For instance, this function call points to the following function
// defined elsewhere in the program:
void LogMsg(const char* msg, void* UserData)
{
- fprintf(stdout, "%s\n", msg);
- fflush(stdout);
}
See Also