Skip to content

Commit

Permalink
redirect log to python console (microsoft#3090)
Browse files Browse the repository at this point in the history
* redir log to python console

* fix pylint

* Apply suggestions from code review

* Update basic.py

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update c_api.h

* Apply suggestions from code review

* Apply suggestions from code review

* super-minor: better wording

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
  • Loading branch information
3 people authored and ChipKerchner committed Jun 24, 2020
1 parent 903e52b commit 1efcad0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,12 @@ int LGBM_GetDeviceType() {
#endif
}

int LGBM_RegisterLogCallback(void (*callback)(const char*)) {
API_BEGIN();
Log::ResetCallBack(callback);
API_END();
}

int LGBM_DatasetCreateFromFile(const char* filename,
const char* parameters,
const DatasetHandle reference,
Expand Down

0 comments on commit 1efcad0

Please sign in to comment.