14 #ifndef OR_TOOLS_UTIL_LOGGING_H_ 15 #define OR_TOOLS_UTIL_LOGGING_H_ 60 void LogInfo(
const char* source_filename,
int source_line,
64 bool is_enabled_ =
false;
65 bool log_to_stdout_ =
false;
66 std::vector<std::function<void(
const std::string&
message)>> info_callbacks_;
69 #define SOLVER_LOG(logger, ...) \ 70 if ((logger)->LoggingIsEnabled()) \ 71 (logger)->LogInfo(__FILE__, __LINE__, absl::StrCat(__VA_ARGS__)) 75 #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.
int NumInfoLoggingCallbacks() const
void ClearInfoLoggingCallbacks()
void AddInfoLoggingCallback(std::function< void(const std::string &message)> callback)