qxLib
fwrite_logger_stream.h
Go to the documentation of this file.
1 /**
2 
3  @file fwrite_logger_stream.h
4  @author Khrapov
5  @date 18.01.2026
6  @copyright (c) Nick Khrapov, 2026. All right reserved.
7 
8 **/
9 #pragma once
10 
12 
13 #include <cstdio>
14 
15 namespace qx
16 {
17 
18 /**
19 
20  @class fwrite_logger_stream
21  @brief Logger stream based on std::fwrite output
22  @details The output is UTF-8 regardless of the char type
23  @author Khrapov
24  @date 18.01.2026
25 
26 **/
28 {
30 
31 public:
32  /**
33  @brief fwrite_logger_stream object constructor
34  @param streamConfig - logger stream configuration
35  **/
36  fwrite_logger_stream(const config& streamConfig = config()) noexcept;
37 
38  fwrite_logger_stream(fwrite_logger_stream&&) noexcept = default;
39 
40  // base_logger_stream
41  //
42  virtual void do_flush() override;
43 
44 private:
45  // base_standard_streams_stream
46  //
47  virtual void cout_colorized(verbosity eVerbosity, string_view svMessage, const color& rangeColor) override;
48  virtual void cout_common(verbosity eVerbosity, string_view svMessage) override;
49 };
50 
51 } // namespace qx
52 
A base class for logger streams based on standard streams.
RGBA color.
Definition: color.h:196
Logger stream based on std::fwrite output.
virtual void do_flush() override
Flush the stream.
fwrite_logger_stream(const config &streamConfig=config()) noexcept
fwrite_logger_stream object constructor