14 DebugMsg(
const char* function,
const int task_id,
bool add_endl=
true)
16 function_name_ = function;
18 prefix_ =
"[" + function_name_ +
":" + std::to_string(task_id) +
"] ";
19 banner_ = prefix_ +
"=============== " + function_name_ +
" ===============";
23 void banner() { std::cout << banner_ << std::endl; };
24 std::string prefix() {
return prefix_; };
26 template <
class T>
DebugMsg& operator<< (
const T& x)
35 if (add_endl_ && count_ == 2) {
36 std::cout << std::endl;
46 DebugMsg& operator<<(std::ostream& (*f)(std::ostream& o))
55 bool add_endl_ =
true;
58 std::string function_name_;