This function registers a logging callback that will be used to handle the wolfSSL log message. By default, if the system supports it fprintf() to stderr is used but by using this function anything can be done by the user.
- Returns
- Success If successful this function will return 0.
-
BAD_FUNC_ARG is the error that will be returned if a function pointer is not provided.
- Parameters
-
log_function | function to register as a logging callback. Function signature must follow the above prototype. |
Example
int ret = 0;
void MyLoggingCallback(const int logLevel, const char* const logMessage);
if (ret != 0) {
}
void MyLoggingCallback(const int logLevel, const char* const logMessage)
{
}
- See also
- wolfSSL_Debugging_ON
-
wolfSSL_Debugging_OFF