Closed tkonolige closed 3 years ago
@hcho3 DMLC_LOG_CUSTOMIZE
only allows customization of LOG(INFO)
and only allows the user to change the method in which the message is printed. My use case is changing the formatting of the log message (specifically the backtrace portion) which is not possible with DMLC_LOG_CUSTOMIZE
.
@tkonolige Does this PR remove the definition of LOG
completely? Is the user expected to furnish a new implementation for LOG
macro from scratch?
Related: https://discuss.tvm.apache.org/t/rfc-line-numbers-in-backtraces/8711. After reading the thread, I was able to better understand the motivation of this PR.
@hcho3 exactly. The user will have to implement their own LOG and CHECK functionality.
Thanks for linking that thread. It provides good context.
@trivialfis You might be interested in this PR. It might help simplify the logging system in XGBoost.
@hcho3 Thanks for the feedback, I've incorporated your changes to the documentation.
@hcho3 @junrushao1994 please take another look, will merge in a day if no further comment
This make DMLC compatible with libraries that do not want to use DMLC's builtin logging facilities. If
DMLC_USE_LOGGING_LIBRARY
is defined, it will be used in place of the builtin library. This definition must point to an include path like<my/logging.h>
.