![]() |
Shamrock 2025.10.0
Astrophysical Code
|
#include "shambase/aliases_int.hpp"#include "shambase/logs.hpp"#include "shambase/print.hpp"#include "shambase/string.hpp"#include "shambase/term_colors.hpp"#include <string>
Include dependency graph for logs.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | shamcomm |
| namespace for communication related stuff | |
| namespace | logger |
| alias namespace to simplify the use of log functions | |
Macros | |
| #define | LIST_LEVEL |
| X-macro for log level definition. | |
| #define | DECLARE_LOG_LEVEL(_name, StructREF) |
| Macro defining the log levels that will be expanded by an X-macro. | |
| #define | X DECLARE_LOG_LEVEL |
| Temp definition for the X macro call to define the log levels. | |
Functions | |
| template<typename... Types> | |
| void | shamcomm::logs::raw (Types... var2) |
| Prints a log message with multiple arguments without newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::raw_ln (Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| void | shamcomm::logs::print_faint_row () |
| Prints a faint separator line to the log. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug_alloc (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug_alloc_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug_mpi (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug_mpi_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug_sycl (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug_sycl_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::debug_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::info (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::info_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::normal (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::normal_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::warn (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::warn_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| template<typename... Types> | |
| void | shamcomm::logs::err (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments. | |
| template<typename... Types> | |
| void | shamcomm::logs::err_ln (std::string module_name, Types... var2) |
| Prints a log message with multiple arguments followed by a newline. | |
| void | shamcomm::logs::print_active_level () |
| Prints the active log levels. | |
| void | shamcomm::logs::code_init_done_log () |
| Indicates that the code initialization is complete through various means ;) | |
Variables | |
| constexpr i8 | shamcomm::logs::log_debug_alloc = ( LogLevel_DebugAlloc ::logval) |
| the log level value associated with debug_alloc | |
| constexpr i8 | shamcomm::logs::log_debug_mpi = ( LogLevel_DebugMPI ::logval) |
| the log level value associated with debug_mpi | |
| constexpr i8 | shamcomm::logs::log_debug_sycl = ( LogLevel_DebugSYCL ::logval) |
| the log level value associated with debug_sycl | |
| constexpr i8 | shamcomm::logs::log_debug = ( LogLevel_Debug ::logval) |
| the log level value associated with debug | |
| constexpr i8 | shamcomm::logs::log_info = ( LogLevel_Info ::logval) |
| the log level value associated with info | |
| constexpr i8 | shamcomm::logs::log_normal = ( LogLevel_Normal ::logval) |
| the log level value associated with normal | |
| constexpr i8 | shamcomm::logs::log_warn = ( LogLevel_Warning ::logval) |
| the log level value associated with warn | |
| constexpr i8 | shamcomm::logs::log_err = ( LogLevel_Error ::logval) |
| the log level value associated with err | |
Definition in file logs.hpp.
| #define DECLARE_LOG_LEVEL | ( | _name, | |
| StructREF | |||
| ) |
Macro defining the log levels that will be expanded by an X-macro.
| #define LIST_LEVEL |
X-macro for log level definition.
This X-macro is used to define the log levels available in the library. It is used to generate the log level structs and the corresponding log formatter functions.
The X-macro takes the following form:
Where:
| #define X DECLARE_LOG_LEVEL |
| void shamcomm::logs::code_init_done_log | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void shamcomm::logs::print_active_level | ( | ) |
|
inline |
Prints a faint separator line to the log.
This is a convenience function to print a separator line to the log. It prints a line of 50 dashes using the shambase::term_colors::faint color.
Definition at line 100 of file logs.hpp.
Here is the call graph for this function:
|
inline |
Prints a log message with multiple arguments without newline.
This is a variadic template that recursively prints a log message by formatting each argument and concatenating them. It uses the shambase::print function to output the formatted message.
| Types | The types of the arguments to be printed |
| var2 | The arguments to be printed |
Definition at line 73 of file logs.hpp.
Here is the call graph for this function:
|
inline |
Prints a log message with multiple arguments followed by a newline.
This is a variadic template that recursively prints a log message by formatting each argument and concatenating them. It uses the shambase::print function to output the formatted message, followed by a newline.
| Types | The types of the arguments to be printed |
| var2 | The arguments to be printed |
Definition at line 90 of file logs.hpp.
Here is the call graph for this function:
|
inline |
|
inline |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |