Add callback interface to re-direct console output (#3438)
* Add callback interface to re-direct console output * Exempt TrackerLogger from custom logging * Fix lint
This commit is contained in:
committed by
GitHub
parent
45bf4fbffb
commit
48d6e68690
@@ -202,6 +202,13 @@ struct XGBAPIThreadLocalEntry {
|
||||
// define the threadlocal store.
|
||||
using XGBAPIThreadLocalStore = dmlc::ThreadLocalStore<XGBAPIThreadLocalEntry>;
|
||||
|
||||
int XGBRegisterLogCallback(void (*callback)(const char*)) {
|
||||
API_BEGIN();
|
||||
LogCallbackRegistry* registry = LogCallbackRegistryStore::Get();
|
||||
registry->Register(callback);
|
||||
API_END();
|
||||
}
|
||||
|
||||
int XGDMatrixCreateFromFile(const char *fname,
|
||||
int silent,
|
||||
DMatrixHandle *out) {
|
||||
|
||||
Reference in New Issue
Block a user