numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Namespace of logging. More...
Namespaces | |
namespace | concepts |
Namespace of C++ concepts. | |
namespace | config |
Namespace of logging configuration. | |
namespace | formatters |
Namespace of formatters of logs. | |
namespace | impl |
Namespace of internal implementations. | |
namespace | iterations |
Namespace of iteration logs. | |
namespace | sinks |
Namespace of log sinks. | |
Classes | |
class | log_tag |
Class of tags of logs. More... | |
class | log_tag_config |
Class to hold configurations for log tags. More... | |
class | log_tag_view |
Class of tags of logs without memory management. More... | |
class | logger |
Class of loggers. More... | |
class | logging_mixin |
Class to incorporate logging in algorithms. More... | |
class | logging_proxy |
Proxy class to write logs. More... | |
class | time_stamp |
Class of time stamps. More... | |
Enumerations | |
enum class | log_level : std::uint8_t { trace , debug , iteration , iteration_label , summary , info , warning , error , critical , off } |
Enumeration of log levels. More... | |
Functions | |
NUM_COLLECT_EXPORT auto | get_config_of (log_tag_view tag) -> log_tag_config |
Get the configuration of a tag. | |
NUM_COLLECT_EXPORT auto | get_default_tag_config () -> log_tag_config |
Get the default configuration of log tags. | |
auto | get_log_level_str (log_level level) noexcept -> std::string_view |
Get the log level string. | |
NUM_COLLECT_EXPORT void | load_logging_config_file (std::string_view filepath) |
Parse and apply configurations of logging from a file. | |
template<std::constructible_from< std::string_view, util::source_info_view > Exception, typename... MessageArgs> requires (sizeof...(MessageArgs) > 0) | |
void | log_and_throw (util::source_info_view source, const logger &l, fmt::format_string< MessageArgs... > message_format, MessageArgs &&... message_args) |
Write an error log and throw an exception for an error. | |
template<std::constructible_from< std::string_view, util::source_info_view > Exception> | |
void | log_and_throw (util::source_info_view source, const logger &l, std::string_view message) |
Write an error log and throw an exception for an error. | |
template<std::constructible_from< std::string_view, util::source_info_view > Exception, typename... MessageArgs> requires (sizeof...(MessageArgs) > 0) | |
void | log_and_throw (util::source_info_view source, fmt::format_string< MessageArgs... > message_format, MessageArgs &&... message_args) |
Write an error log and throw an exception for an error. | |
template<std::constructible_from< std::string_view, util::source_info_view > Exception> | |
void | log_and_throw (util::source_info_view source, std::string_view message) |
Write an error log and throw an exception for an error. | |
NUM_COLLECT_EXPORT void | set_config_of (log_tag_view tag, const log_tag_config &config) |
Set the configuration of a tag. | |
NUM_COLLECT_EXPORT void | set_default_tag_config (const log_tag_config &config) |
Set the default configuration of log tags. | |
Variables | |
constexpr auto | default_tag = log_tag_view("") |
Default log tag. | |
Namespace of logging.
|
strong |
Enumeration of log levels.
Log level | Usage in this library |
---|---|
trace | Internal trace logs for developer of this library. |
debug | Log for debugging. |
iteration | Log of each iteration. |
iteration_label | Label of iteration logs. (Not usable for output log level.) |
summary | Summary of calculations. |
info | None. (Meant for use in user code to show some information.) |
warning | Warnings of undesirable conditions. |
error | Errors preventing further processing. (Usually used with exceptions.) |
critical | None. (Meant for use in conditions which may cause death of processes.) |
off | Turn off output. (Only for output log level.) |
Definition at line 47 of file log_level.h.
|
nodiscard |
Get the configuration of a tag.
[in] | tag | Tag. |
|
nodiscard |
Get the default configuration of log tags.
|
inlinenodiscardnoexcept |
Get the log level string.
[in] | level | Log level. |
Definition at line 85 of file log_level.h.
NUM_COLLECT_EXPORT void num_collect::logging::load_logging_config_file | ( | std::string_view | filepath | ) |
Parse and apply configurations of logging from a file.
[in] | filepath | File path. |
void num_collect::logging::log_and_throw | ( | util::source_info_view | source, |
const logger & | l, | ||
fmt::format_string< MessageArgs... > | message_format, | ||
MessageArgs &&... | message_args ) |
Write an error log and throw an exception for an error.
Exception | Type of the exception. |
MessageArgs | Types of arguments for formatting of the error message. |
[in] | source | Information of the source code. |
[in] | l | Logger. |
[in] | message_format | Format of the error message. |
[in] | message_args | Arguments for formatting of the error message. |
Definition at line 104 of file logging_macros.h.
void num_collect::logging::log_and_throw | ( | util::source_info_view | source, |
const logger & | l, | ||
std::string_view | message ) |
Write an error log and throw an exception for an error.
Exception | Type of the exception. |
[in] | source | Information of the source code. |
[in] | l | Logger. |
[in] | message | Error message. |
Definition at line 84 of file logging_macros.h.
void num_collect::logging::log_and_throw | ( | util::source_info_view | source, |
fmt::format_string< MessageArgs... > | message_format, | ||
MessageArgs &&... | message_args ) |
Write an error log and throw an exception for an error.
Exception | Type of the exception. |
MessageArgs | Types of arguments for formatting of the error message. |
[in] | source | Information of the source code. |
[in] | message_format | Format of the error message. |
[in] | message_args | Arguments for formatting of the error message. |
Definition at line 142 of file logging_macros.h.
void num_collect::logging::log_and_throw | ( | util::source_info_view | source, |
std::string_view | message ) |
Write an error log and throw an exception for an error.
Exception | Type of the exception. |
[in] | source | Information of the source code. |
[in] | message | Error message. |
Definition at line 123 of file logging_macros.h.
NUM_COLLECT_EXPORT void num_collect::logging::set_config_of | ( | log_tag_view | tag, |
const log_tag_config & | config ) |
Set the configuration of a tag.
[in] | tag | Tag. |
[in] | config | Configuration. |
NUM_COLLECT_EXPORT void num_collect::logging::set_default_tag_config | ( | const log_tag_config & | config | ) |
Set the default configuration of log tags.
[in] | config | Configuration. |
|
constexpr |