52 const std::string &color,
54 const std::string &module_name,
55 const std::string &content) {
58 return "[" + (color) + module_name + shambase::term_colors::reset() +
"] " + (color)
59 + (name) + shambase::term_colors::reset() +
": " + content;
74 const std::string &color,
76 const std::string &module_name,
77 const std::string &content) {
81 return "[" + (color) + module_name + shambase::term_colors::reset() +
"] " + (color)
82 + (name) + shambase::term_colors::reset() +
": " + content;
Namespace containing logs utils.
void change_formaters(reformat_func_ptr full, reformat_func_ptr simple)
Changes the log formatter functions.
reformat_func_ptr _reformat_all
Pointer to the full formatter function.
std::string reformat_all(const std::string &color, const char *name, const std::string &module_name, const std::string &content)
Format a log message with all the information.
std::string(*)(const ReformatArgs &args) reformat_func_ptr
A pointer to a log formatter function.
reformat_func_ptr _reformat_simple
Pointer to the simple formatter function.
std::string reformat_simple(const std::string &color, const char *name, const std::string &module_name, const std::string &content)
Format a log message with the minimum information.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.