Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Classes | Macros
loglevels.hpp File Reference
#include "shambase/aliases_int.hpp"
#include <string>
+ Include dependency graph for loglevels.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LogLevel_DebugAlloc
 Log level struct for debugging memory allocation. More...
 
struct  LogLevel_DebugMPI
 Log level struct for debugging MPI operations. More...
 
struct  LogLevel_DebugSYCL
 Log level struct for debugging SYCL operations. More...
 
struct  LogLevel_Debug
 Log level struct for debugging general operations. More...
 
struct  LogLevel_Info
 Log level struct for informational messages. More...
 
struct  LogLevel_Normal
 Log level struct for normal messages. More...
 
struct  LogLevel_Warning
 Log level struct for warning messages. More...
 
struct  LogLevel_Error
 Log level struct for error messages. More...
 

Macros

#define shamlog_debug_alloc(module_name, ...)
 
#define shamlog_debug_alloc_ln(module_name, ...)
 
#define when_shamlog_debug_alloc    if (shambase::logs::details::loglevel >= LogLevel_DebugAlloc::logval)
 
#define shamlog_debug_mpi(module_name, ...)
 
#define shamlog_debug_mpi_ln(module_name, ...)
 
#define when_shamlog_debug_mpi   if (shambase::logs::details::loglevel >= LogLevel_DebugMPI::logval)
 
#define shamlog_debug_sycl(module_name, ...)
 
#define shamlog_debug_sycl_ln(module_name, ...)
 
#define when_shamlog_debug_sycl   if (shambase::logs::details::loglevel >= LogLevel_DebugSYCL::logval)
 
#define shamlog_debug(module_name, ...)
 
#define shamlog_debug_ln(module_name, ...)
 
#define when_shamlog_debug   if (shambase::logs::details::loglevel >= LogLevel_Debug::logval)
 
#define shamlog_info(module_name, ...)
 
#define shamlog_info_ln(module_name, ...)
 
#define when_shamlog_info   if (shambase::logs::details::loglevel >= LogLevel_Info::logval)
 
#define shamlog_normal(module_name, ...)
 
#define shamlog_normal_ln(module_name, ...)
 
#define when_shamlog_normal   if (shambase::logs::details::loglevel >= LogLevel_Normal::logval)
 
#define shamlog_warn(module_name, ...)
 
#define shamlog_warn_ln(module_name, ...)
 
#define when_shamlog_warn   if (shambase::logs::details::loglevel >= LogLevel_Warning::logval)
 
#define shamlog_error(module_name, ...)
 
#define shamlog_error_ln(module_name, ...)
 
#define when_shamlog_error   if (shambase::logs::details::loglevel >= LogLevel_Error::logval)
 

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file loglevels.hpp.

Macro Definition Documentation

◆ shamlog_debug

#define shamlog_debug (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Debug::logval) { \
shambase::logs::print( \
}
std::string format_message()
Formats an empty log message.
Definition msgformat.hpp:37
static constexpr i8 logval
Log level value.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging general operations.
Definition logs.cpp:122

Definition at line 155 of file loglevels.hpp.

◆ shamlog_debug_alloc

#define shamlog_debug_alloc (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_DebugAlloc::logval) { \
shambase::logs::print( \
shambase::logs::format_message(__VA_ARGS__), module_name)); \
}
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging memory allocation.
Definition logs.cpp:109
static constexpr i8 logval
Log level value.
Definition loglevels.hpp:28

Definition at line 43 of file loglevels.hpp.

◆ shamlog_debug_alloc_ln

#define shamlog_debug_alloc_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_DebugAlloc::logval) { \
shambase::logs::print_ln( \
shambase::logs::format_message(__VA_ARGS__), module_name)); \
}

Definition at line 50 of file loglevels.hpp.

◆ shamlog_debug_ln

#define shamlog_debug_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Debug::logval) { \
shambase::logs::print_ln( \
}

Definition at line 161 of file loglevels.hpp.

◆ shamlog_debug_mpi

#define shamlog_debug_mpi (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_DebugMPI::logval) { \
shambase::logs::print( \
shambase::logs::format_message(__VA_ARGS__), module_name)); \
}
static constexpr i8 logval
Log level value.
Definition loglevels.hpp:66
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging MPI operations.
Definition logs.cpp:113

Definition at line 81 of file loglevels.hpp.

◆ shamlog_debug_mpi_ln

#define shamlog_debug_mpi_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_DebugMPI::logval) { \
shambase::logs::print_ln( \
shambase::logs::format_message(__VA_ARGS__), module_name)); \
}

Definition at line 88 of file loglevels.hpp.

◆ shamlog_debug_sycl

#define shamlog_debug_sycl (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_DebugSYCL::logval) { \
shambase::logs::print( \
shambase::logs::format_message(__VA_ARGS__), module_name)); \
}
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for debugging SYCL operations.
Definition logs.cpp:117
static constexpr i8 logval
Log level value.

Definition at line 118 of file loglevels.hpp.

◆ shamlog_debug_sycl_ln

#define shamlog_debug_sycl_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_DebugSYCL::logval) { \
shambase::logs::print_ln( \
shambase::logs::format_message(__VA_ARGS__), module_name)); \
}

Definition at line 125 of file loglevels.hpp.

◆ shamlog_error

#define shamlog_error (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Error::logval) { \
shambase::logs::print( \
}
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for error messages.
Definition logs.cpp:138
static constexpr i8 logval
Log level value.

Definition at line 295 of file loglevels.hpp.

◆ shamlog_error_ln

#define shamlog_error_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Error::logval) { \
shambase::logs::print_ln( \
}

Definition at line 301 of file loglevels.hpp.

◆ shamlog_info

#define shamlog_info (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Info::logval) { \
shambase::logs::print( \
}
static constexpr i8 logval
Log level value.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for informational messages.
Definition logs.cpp:126

Definition at line 190 of file loglevels.hpp.

◆ shamlog_info_ln

#define shamlog_info_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Info::logval) { \
shambase::logs::print_ln( \
}

Definition at line 196 of file loglevels.hpp.

◆ shamlog_normal

#define shamlog_normal (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Normal::logval) { \
shambase::logs::print( \
}
static constexpr i8 logval
Log level value.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for normal messages.
Definition logs.cpp:130

Definition at line 225 of file loglevels.hpp.

◆ shamlog_normal_ln

#define shamlog_normal_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Normal::logval) { \
shambase::logs::print_ln( \
}

Definition at line 231 of file loglevels.hpp.

◆ shamlog_warn

#define shamlog_warn (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Warning::logval) { \
shambase::logs::print( \
}
static constexpr i8 logval
Log level value.
static std::string reformat(const std::string &in, std::string module_name)
Log formatter function for warning messages.
Definition logs.cpp:134

Definition at line 260 of file loglevels.hpp.

◆ shamlog_warn_ln

#define shamlog_warn_ln (   module_name,
  ... 
)
Value:
if (shambase::logs::details::loglevel >= LogLevel_Warning::logval) { \
shambase::logs::print_ln( \
}

Definition at line 266 of file loglevels.hpp.

◆ when_shamlog_debug

#define when_shamlog_debug   if (shambase::logs::details::loglevel >= LogLevel_Debug::logval)

Definition at line 167 of file loglevels.hpp.

◆ when_shamlog_debug_alloc

#define when_shamlog_debug_alloc    if (shambase::logs::details::loglevel >= LogLevel_DebugAlloc::logval)

Definition at line 57 of file loglevels.hpp.

◆ when_shamlog_debug_mpi

#define when_shamlog_debug_mpi   if (shambase::logs::details::loglevel >= LogLevel_DebugMPI::logval)

Definition at line 95 of file loglevels.hpp.

◆ when_shamlog_debug_sycl

#define when_shamlog_debug_sycl   if (shambase::logs::details::loglevel >= LogLevel_DebugSYCL::logval)

Definition at line 132 of file loglevels.hpp.

◆ when_shamlog_error

#define when_shamlog_error   if (shambase::logs::details::loglevel >= LogLevel_Error::logval)

Definition at line 307 of file loglevels.hpp.

◆ when_shamlog_info

#define when_shamlog_info   if (shambase::logs::details::loglevel >= LogLevel_Info::logval)

Definition at line 202 of file loglevels.hpp.

◆ when_shamlog_normal

#define when_shamlog_normal   if (shambase::logs::details::loglevel >= LogLevel_Normal::logval)

Definition at line 237 of file loglevels.hpp.

◆ when_shamlog_warn

#define when_shamlog_warn   if (shambase::logs::details::loglevel >= LogLevel_Warning::logval)

Definition at line 272 of file loglevels.hpp.