14 #ifndef OR_TOOLS_UTIL_LOGGING_H_ 15 #define OR_TOOLS_UTIL_LOGGING_H_ 54 void LogInfo(
const char* source_filename,
int source_line,
58 bool is_enabled_ =
false;
59 bool log_to_stdout_ =
false;
60 std::vector<std::function<void(
const std::string&
message)>> info_callbacks_;
63 #define SOLVER_LOG(logger, ...) \ 64 if ((logger)->LoggingIsEnabled()) \ 65 (logger)->LogInfo(__FILE__, __LINE__, absl::StrCat(__VA_ARGS__)) 69 #endif // OR_TOOLS_UTIL_LOGGING_H_ void EnableLogging(bool enable)
void SetLogToStdOut(bool enable)
bool LoggingIsEnabled() const
void LogInfo(const char *source_filename, int source_line, const std::string &message)
Collection of objects used to extend the Constraint Solver library.
void AddInfoLoggingCallback(std::function< void(const std::string &message)> callback)