[#btck_logging_connection_create] = btck_logging_connection_create :mrdocs: 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. == Synopsis Declared in `<kernel/bitcoinkernel.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard, __nonnull__]] xref:btck_LoggingConnection-04.adoc[btck_LoggingConnection]* btck_logging_connection_create( xref:btck_LogCallback.adoc[btck_LogCallback] log_callback, void* user_data, xref:btck_DestroyCallback.adoc[btck_DestroyCallback] user_data_destroy_callback); ---- == Return Value A new kernel logging connection, or null on error. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#