44 X(debug_alloc, LogLevel_DebugAlloc) \
45 X(debug_mpi, LogLevel_DebugMPI) \
46 X(debug_sycl, LogLevel_DebugSYCL) \
47 X(debug, LogLevel_Debug) \
48 X(info, LogLevel_Info) \
49 X(normal, LogLevel_Normal) \
50 X(warn, LogLevel_Warning) \
51 X(err, LogLevel_Error)
53namespace shamcomm::logs {
72 template<
typename... Types>
73 inline void raw(Types... var2) {
89 template<
typename... Types>
102 shambase::term_colors::faint() +
"-----------------------------------------------------"
103 + shambase::term_colors::reset());
111#define DECLARE_LOG_LEVEL(_name, StructREF) \
113 constexpr i8 log_##_name = (StructREF::logval); \
115 template<typename... Types> \
116 inline void _name(std::string module_name, Types... var2) { \
117 if (details::loglevel >= log_##_name) { \
118 shamcomm::logs::print( \
119 StructREF::reformat(shamcomm::logs::format_message(var2...), module_name)); \
123 template<typename... Types> \
124 inline void _name##_ln(std::string module_name, Types... var2) { \
125 if (details::loglevel >= log_##_name) { \
126 shamcomm::logs::print_ln( \
127 StructREF::reformat(shamcomm::logs::format_message(var2...), module_name)); \
132#define X DECLARE_LOG_LEVEL
136#undef DECLARE_LOG_LEVEL
321 using namespace shamcomm::logs;
alias namespace to simplify the use of log functions
Namespace containing logs utils.
void print()
Prints a log message with no arguments.
void print_ln()
Prints a log message with multiple arguments followed by a newline.
void print_active_level()
Prints the active log levels.
void code_init_done_log()
Indicates that the code initialization is complete through various means ;)
void raw_ln(Types... var2)
Prints a log message with multiple arguments followed by a newline.
void raw(Types... var2)
Prints a log message with multiple arguments without newline.
void print_faint_row()
Prints a faint separator line to the log.
#define LIST_LEVEL
X-macro for log level definition.