24 inline void fwrite_logger_stream::cout_colorized(verbosity eVerbosity, string_view svMessage,
const color& rangeColor)
28 FILE* output = !
is_error(eVerbosity) ? stdout : stderr;
30 fwrite(svMessage.data(),
sizeof(char_type), svMessage.size(), output);
34 inline void fwrite_logger_stream::cout_common(verbosity eVerbosity, string_view svMessage)
38 FILE* output = !is_error(eVerbosity) ? stdout : stderr;
39 fwrite(svMessage.data(),
sizeof(char_type), svMessage.size(), output);
A base class for logger streams based on standard streams.
void check_previous_message(verbosity eCurrentMessageVerbosity)
Check the previous message type and flush if needed.
virtual void do_flush() override
Flush the stream.
fwrite_logger_stream(const config &streamConfig=config()) noexcept
fwrite_logger_stream object constructor
static constexpr terminal_color reset() noexcept
Reset all colors.
void write(FILE *pStream) const
Write terminal color to the specified stream.
static constexpr terminal_color font(const color &fontColor) noexcept
Set font color.
bool is_error(verbosity eVerbosity) noexcept
Check if the verbosity level is an error.