Proxy class to write logs.
More...
#include <num_collect/logging/logger.h>
Proxy class to write logs.
- Warning
- This class is assumed to be used only as an temporary object returned from num_collect::logging::logger class.
Definition at line 49 of file logger.h.
◆ logging_proxy()
Constructor.
- Parameters
-
[in] | tag | Tag. |
[in] | level | Log level. |
[in] | source | Information of the source code. |
[in] | sink | Log sink. |
[in] | write_log | Whether to write log. |
Definition at line 60 of file logger.h.
◆ operator()() [1/2]
template<typename... Args>
requires (sizeof...(Args) > 0)
void num_collect::logging::logging_proxy::operator() |
( |
fmt::format_string< Args... > | format, |
|
|
Args &&... | args ) const |
|
inline |
Write a log.
- Template Parameters
-
- Parameters
-
[in] | format | Format string. |
[in] | args | Arguments for the format string. |
Definition at line 91 of file logger.h.
◆ operator()() [2/2]
void num_collect::logging::logging_proxy::operator() |
( |
std::string_view | body | ) |
const |
|
inline |
Write a log.
- Parameters
-
Definition at line 74 of file logger.h.
◆ level_
log_level num_collect::logging::logging_proxy::level_ |
|
private |
◆ sink_
◆ source_
Information of the source code.
Definition at line 111 of file logger.h.
◆ tag_
std::string_view num_collect::logging::logging_proxy::tag_ |
|
private |
◆ write_log_
bool num_collect::logging::logging_proxy::write_log_ |
|
private |
Whether to write log.
Definition at line 117 of file logger.h.
The documentation for this class was generated from the following file: