Start logging messages through the provided callback. Log messages produced before this function is first called are buffered and on calling this function are logged immediately.
Declared in <kernel/bitcoinkernel.h>
[[nodiscard, __nonnull__]]
btck_LoggingConnection*
btck_logging_connection_create(
btck_LogCallback log_callback,
void* user_data,
btck_DestroyCallback user_data_destroy_callback);
A new kernel logging connection, or null on error.
The return value should not be discarded.
| Name | Description |
|---|---|
| log_callback [in] | Non-null, function through which messages will be logged. |
| user_data [in] | Nullable, holds a user-defined opaque structure. Is passed back to the user through the callback. If the user_data_destroy_callback is also defined it is assumed that ownership of the user_data is passed to the created logging connection. |
| user_data_destroy_callback [in] | Nullable, function for freeing the user data. |