43 X(debug_alloc, LogLevel_DebugAlloc) \
44 X(debug_mpi, LogLevel_DebugMPI) \
45 X(debug_sycl, LogLevel_DebugSYCL) \
46 X(debug, LogLevel_Debug) \
47 X(info, LogLevel_Info) \
48 X(normal, LogLevel_Normal) \
49 X(warn, LogLevel_Warning) \
50 X(err, LogLevel_Error)
52namespace shamcomm::logs {
71 template<
typename... Types>
72 inline void raw(Types... var2) {
88 template<
typename... Types>
110#define DECLARE_LOG_LEVEL(_name, StructREF) \
112 constexpr i8 log_##_name = (StructREF::logval); \
114 template<typename... Types> \
115 inline void _name(std::string module_name, Types... var2) { \
116 if (details::loglevel >= log_##_name) { \
117 shamcomm::logs::print( \
118 StructREF::reformat(shamcomm::logs::format_message(var2...), module_name)); \
122 template<typename... Types> \
123 inline void _name##_ln(std::string module_name, Types... var2) { \
124 if (details::loglevel >= log_##_name) { \
125 shamcomm::logs::print_ln( \
126 StructREF::reformat(shamcomm::logs::format_message(var2...), module_name)); \
131#define X DECLARE_LOG_LEVEL
135#undef DECLARE_LOG_LEVEL
320 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.
const std::string reset()
Get the reset terminal escape char.
const std::string faint()
Get the faint terminal escape char.