Type-erased handle to an advanced log sink backend, with a severity threshold. Same two-word-plus-vtable shape as log_sink.
More...
#include <extended_sink.hpp>
|
| constexpr | extended_log_sink () noexcept=default |
| |
template<typename Tag , typename Context , typename Traits = extended_log_sink_traits<Tag>>
requires (std::is_convertible_v<Context *, typename Traits::context_type *>) |
| constexpr | extended_log_sink (Tag, Context &ctx RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS, level lvl=level::trace) noexcept |
| |
template<typename Tag , typename Context >
requires (!std::is_lvalue_reference_v<Context>) |
| constexpr | extended_log_sink (Tag, Context &&, level=level::trace)=delete |
| |
| void | log (const extended_log_msg &msg) noexcept |
| | Emits msg unless it is below this sink's threshold.
|
| |
| constexpr bool | can_report_full () const noexcept |
| | Reports whether the backend can say it is full.
|
| |
| bool | full (const extended_log_msg &msg) noexcept |
| | Whether msg could not be accepted right now without waiting or overwriting. false for backends that cannot report fullness and for records the threshold would drop anyway.
|
| |
| constexpr bool | can_flush () const noexcept |
| |
| void | flush () noexcept |
| |
| void | set_level (level l) noexcept |
| |
| constexpr bool | should_log (level l) const noexcept |
| |
| constexpr | operator bool () const noexcept |
| |
Type-erased handle to an advanced log sink backend, with a severity threshold. Same two-word-plus-vtable shape as log_sink.
◆ extended_log_sink() [1/3]
| constexpr microfmt::log::extended_log_sink::extended_log_sink |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ extended_log_sink() [2/3]
template<typename Tag , typename Context , typename Traits = extended_log_sink_traits<Tag>>
requires (std::is_convertible_v<Context *, typename Traits::context_type *>)
| constexpr microfmt::log::extended_log_sink::extended_log_sink |
( |
Tag |
, |
|
|
Context &ctx RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS, |
|
|
level |
lvl = level::trace |
|
) |
| |
|
inlineconstexprnoexcept |
◆ extended_log_sink() [3/3]
template<typename Tag , typename Context >
requires (!std::is_lvalue_reference_v<Context>)
| constexpr microfmt::log::extended_log_sink::extended_log_sink |
( |
Tag |
, |
|
|
Context && |
, |
|
|
level |
= level::trace |
|
) |
| |
|
constexprdelete |
◆ can_flush()
| constexpr bool microfmt::log::extended_log_sink::can_flush |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ can_report_full()
| constexpr bool microfmt::log::extended_log_sink::can_report_full |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Reports whether the backend can say it is full.
◆ flush()
| void microfmt::log::extended_log_sink::flush |
( |
| ) |
|
|
inlinenoexcept |
◆ full()
Whether msg could not be accepted right now without waiting or overwriting. false for backends that cannot report fullness and for records the threshold would drop anyway.
◆ log()
Emits msg unless it is below this sink's threshold.
◆ operator bool()
| constexpr microfmt::log::extended_log_sink::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
◆ set_level()
| void microfmt::log::extended_log_sink::set_level |
( |
level |
l | ) |
|
|
inlinenoexcept |
◆ should_log()
| constexpr bool microfmt::log::extended_log_sink::should_log |
( |
level |
l | ) |
const |
|
inlineconstexprnoexcept |
The documentation for this class was generated from the following file: