mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
kernel: Add logging to kernel library C header
Exposing logging in the kernel library allows users to follow operations. Users of the C header can use `kernel_logging_connection_create(...)` to pass a callback function to Bitcoin Core's internal logger. Additionally the level and category can be globally configured. By default, the logger buffers messages until `kernel_loggin_connection_create(...)` is called. If the user does not want any logging messages, it is recommended that `kernel_disable_logging()` is called, which permanently disables the logging and any buffering of messages. Co-authored-by: stringintech <stringintech@gmail.com>
This commit is contained in:
@@ -201,6 +201,7 @@ static const std::map<std::string, BCLog::LogFlags, std::less<>> LOG_CATEGORIES_
|
||||
{"txreconciliation", BCLog::TXRECONCILIATION},
|
||||
{"scan", BCLog::SCAN},
|
||||
{"txpackages", BCLog::TXPACKAGES},
|
||||
{"kernel", BCLog::KERNEL},
|
||||
};
|
||||
|
||||
static const std::unordered_map<BCLog::LogFlags, std::string> LOG_CATEGORIES_BY_FLAG{
|
||||
|
||||
Reference in New Issue
Block a user