Treelite
c_api_common.cc
Go to the documentation of this file.
1 
8 #include <treelite/logging.h>
10 #include "./c_api_error.h"
11 
12 using namespace treelite;
13 
14 int TreeliteRegisterLogCallback(void (*callback)(const char*)) {
15  API_BEGIN();
16  LogCallbackRegistry* registry = LogCallbackRegistryStore::Get();
17  registry->Register(callback);
18  API_END();
19 }
#define API_BEGIN()
macro to guard beginning and end section of all functions
Definition: c_api_error.h:15
logging facility for Treelite
Error handling for C API.
int TreeliteRegisterLogCallback(void(*callback)(const char *))
register callback function for LOG(INFO) messages – helpful messages that are not errors...
Definition: c_api_common.cc:14
C API of Treelite, used for interfacing with other languages This header is used by both the runtime ...
#define API_END()
every function starts with API_BEGIN(); and finishes with API_END() or API_END_HANDLE_ERROR ...
Definition: c_api_error.h:18