24namespace shamcomm::logs {
31#define IsActivePrint(_name, StructREF) _name##_ln("xxx", "xxx", "(", "logger::" #_name, ")");
36 raw_ln(
"If you've seen spam in your life i can garantee you, this is worst");
44#define X IsActivePrint
59 auto lines = std::array<std::string, 16>{
61 "Now it's time to " + shambase::term_colors::col8b_cyan()
62 + shambase::term_colors::blink() +
"ROCK" + shambase::term_colors::reset() +
".",
63 "Shamrock rolls - no time for moss.",
64 "Shamrock's live - go with the flow.",
65 "Shamrock - as solid as a rock.",
66 "Shamrock's stable and steady as a rock.",
67 "Shamrock initialized - no cracks in this rock.",
68 "Shamrock is ready to eat cheese (melted) and bread.",
69 "Are you sure you want to work today?",
70 "No holidays for the Shamrock ... (yeah, this was a PhD at some point)",
71 "-[--->+<]>--.>+[----->+++<]>+.-------.++++++++++++.+++++.---.------------.++++++++.",
72 "CPU hours to burn? We don't do such thing here.",
73 "Are you burning GPUs or CPUs today?",
76 "Shamrock your way to a brighter day!",
77 "Node hours to burn? Leaf it to me.",
78 "Ready for some shamazing simulations?",
80While you wait for this simulation to run, give that cat a hug!
87 auto get_sentence = [&]() {
88 f64 t = shambase::details::get_wtime();
89 u64 idx =
static_cast<u64>(std::floor(
97 logger::print_faint_row();
100 shambase::term_colors::col8b_green() +
"DONE" + shambase::term_colors::reset()
103 logger::print_faint_row();
119 shambase::term_colors::col8b_magenta(),
level_name, module_name, in);
double f64
Alias for double.
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
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.
i8 get_loglevel()
Get the current global log level.
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.
i32 world_rank()
Gives the rank of the current process in the MPI communicator.
constexpr i8 i8_max
i8 max value
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.
#define LIST_LEVEL
X-macro for log level definition.
This file contains the definition for the stacktrace related functionality.
static constexpr const char * level_name
Log level name.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging memory allocation.
static constexpr const char * level_name
Log level name.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging MPI operations.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging SYCL operations.
static constexpr const char * level_name
Log level name.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging general operations.
static constexpr const char * level_name
Log level name.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for error messages.
static constexpr const char * level_name
Log level name.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for informational messages.
static constexpr const char * level_name
Log level name.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for normal messages.
static constexpr const char * level_name
Log level name.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for warning messages.
Functions related to the MPI communicator.