15 #ifndef QX_LOGGER_INSTANCE
16 #define QX_LOGGER_INSTANCE qx::logger_singleton::get_instance().get_logger()
27 #define QX_LOG_C(category, eVerbosity, format, ...) \
28 QX_LOGGER_INSTANCE.log( \
32 qx::to_string(__FUNCTION__), \
46 #define QX_LOG(eVerbosity, format, ...) QX_LOG_C(CatDefault, eVerbosity, format, ##__VA_ARGS__)
52 template<
class... args_t>
53 concept log_acceptable_args_c = (
sizeof...(args_t) > 0 && format_acceptable_args_c<char_type, args_t...>);
79 string_view svFunction,
81 string_view svMessage);
94 template<
class... args_t>
100 string_view svFunction,
115 template<sbo_poly_assignable_c<base_logger_stream> stream_t>
121 void reset() noexcept;
135 verbosity eVerbosity,
137 string_view svFunction) const noexcept;
Base class for logger streams.
A category is a class that identifies a particular piece of code. This code can be located in differe...
requires(log_acceptable_args_c< args_t... >) void log(const category &category
Log to all streams.
void add_stream(stream_t stream) noexcept
Add an output stream to the logger.
void log(const category &category, verbosity eVerbosity, string_view svFile, string_view svFunction, int nLine, string_view svMessage)
Log to all streams.
bool will_any_stream_accept(const category &category, verbosity eVerbosity, string_view svFile, string_view svFunction) const noexcept
Returns true if any of streams will accept this message.
void reset() noexcept
Reset logger and clear all streams.
void flush()
Flush all streams.
Small Buffer Object for polymorphic classes.
Inherit the necessary singleton class from this.