45 bool bProtectLog =
true;
48 verbosity eMinFlushVerbosity = verbosity::error;
67 compile_pattern_result
set_pattern(
string sPattern) noexcept;
73 std::optional<string_view>
get_pattern() const noexcept;
90 std::thread::
id threadId,
91 std::chrono::system_clock::time_point messageTime,
93 string_view svFunction,
95 string_view svMessage);
116 verbosity eVerbosity,
117 std::thread::
id threadId,
118 std::chrono::system_clock::time_point messageTime,
120 string_view svFunction,
121 int nLine) const noexcept;
137 verbosity eVerbosity,
138 std::thread::
id threadId,
139 std::chrono::system_clock::time_point messageTime,
141 string_view svFunction,
143 string_view svMessage) = 0;
148 virtual
void do_flush() = 0;
151 std::optional<
string> m_optPattern;
152 std::unique_ptr<std::recursive_mutex> m_pMutex;
153 verbosity m_eMinFlushVerbosity = verbosity::error;
154 bool m_bProtectLog = true;
159 #include <qx/logger/base_logger_stream.inl>
#define QX_DEFINE_CATEGORY(name,...)
Define a category.
Base class for logger streams.
virtual bool log_unconditionally_required(const category &category, verbosity eVerbosity, std::thread::id threadId, std::chrono::system_clock::time_point messageTime, string_view svFile, string_view svFunction, int nLine) const noexcept
Returns true if this message should be processed by this stream even if the logger filters did not pa...
std::optional< string_view > get_pattern() const noexcept
Get a message pattern if present.
void log(const category &category, verbosity eVerbosity, std::thread::id threadId, std::chrono::system_clock::time_point messageTime, string_view svFile, string_view svFunction, int nLine, string_view svMessage)
Output to stream.
void flush()
Flush the stream.
base_logger_stream(const config &streamConfig) noexcept
base_logger_stream object constructor
compile_pattern_result set_pattern(string sPattern) noexcept
Set a message pattern that will be used for this stream.
A category is a class that identifies a particular piece of code. This code can be located in differe...
Contains perf scope macros for profiler (for internal usage only, but user may override them)
RTTI system based on polymorphism.