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:
Philip Hyunsu Cho
2018-07-05 11:32:30 -07:00
committed by GitHub
parent 45bf4fbffb
commit 48d6e68690
7 changed files with 64 additions and 5 deletions

View File

@@ -96,6 +96,15 @@ XGB_EXTERN_C typedef int XGBCallbackDataIterNext( // NOLINT(*)
*/
XGB_DLL const char *XGBGetLastError(void);
/*!
* \brief register callback function for LOG(INFO) messages -- helpful messages
* that are not errors.
* Note: this function can be called by multiple threads. The callback function
* will run on the thread that registered it
* \return 0 for success, -1 for failure
*/
XGB_DLL int XGBRegisterLogCallback(void (*callback)(const char*));
/*!
* \brief load a data matrix
* \param fname the name of the file