Log utility module implementation file. More...
Go to the source code of this file.
Functions | |
static void | _mcl_log_util_default_callback (void *user_context, int log_level, const char *file, int line, const char *tag, const char *const format,...) |
mcl_error_t | mcl_log_util_set_output_level (const int log_level) |
int | mcl_log_util_get_output_level (void) |
mcl_error_t | mcl_log_util_set_callback (mcl_log_util_callback_t callback, void *user_context) |
Variables | |
static int | _mcl_log_level = MCL_LOG_LEVEL |
mcl_log_util_callback_t | mcl_log_util_function = _mcl_log_util_default_callback |
void * | mcl_log_util_user_context = NULL |
static const char * | _mcl_level_strings [] |
Log utility module implementation file.
Definition in file log_util.c.
|
static |
Definition at line 81 of file log_util.c.
References _mcl_level_strings, and MCL_LOG_LEVEL_VERBOSE.
int mcl_log_util_get_output_level | ( | void | ) |
This function is used to get log output level.
Definition at line 51 of file log_util.c.
References _mcl_log_level, and MCL_LOG_LEVEL_NONE.
mcl_error_t mcl_log_util_set_callback | ( | mcl_log_util_callback_t | callback, |
void * | user_context | ||
) |
This function is used to set callback function for log utility.
[in] | callback | Callback function. |
[in] | user_context | User context argument. |
callback
is null. Definition at line 60 of file log_util.c.
References MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FAIL, MCL_FUNCTION_LEAVE_LABEL, mcl_log_util_function, mcl_log_util_user_context, and MCL_OK.
mcl_error_t mcl_log_util_set_output_level | ( | const int | log_level | ) |
This function sets the output level. The output level is used during runtime check. No logs are written if given log level is below this output level.
[in] | log_level | The output level to set with. Following log levels can be set.
|
Definition at line 33 of file log_util.c.
References _mcl_log_level, MCL_INVALID_LOG_LEVEL, MCL_LOG_LEVEL, MCL_LOG_LEVEL_FATAL, MCL_LOG_LEVEL_NONE, and MCL_OK.
|
static |
Definition at line 22 of file log_util.c.
Referenced by _mcl_log_util_default_callback().
|
static |
Definition at line 17 of file log_util.c.
Referenced by mcl_log_util_get_output_level(), and mcl_log_util_set_output_level().
mcl_log_util_callback_t mcl_log_util_function = _mcl_log_util_default_callback |
Definition at line 19 of file log_util.c.
Referenced by mbedtls_debug_function(), and mcl_log_util_set_callback().
void* mcl_log_util_user_context = NULL |
Definition at line 20 of file log_util.c.
Referenced by mbedtls_debug_function(), and mcl_log_util_set_callback().