|
qxLib
|
Logger stream for std::cout output. More...
#include <cout_logger_stream.h>
Public Member Functions | |
| cout_logger_stream (bool bAlwaysFlush=false, bool bUseColors=true, bool bDisableStdioSync=true, bool bUntieCin=true) | |
| cout_logger_stream object constructor More... | |
| virtual void | flush () override |
| Flush stream. | |
| virtual void | do_log (string_view svMessage, const log_unit &logUnit, const std::vector< logger_color_range > &colors, verbosity eVerbosity) override |
| Proceed stream logging. More... | |
| void | set_using_colors (bool bUsingColors) noexcept |
| Set whether cout output should be colored. More... | |
Public Member Functions inherited from qx::base_logger_stream | |
| base_logger_stream (bool bAlwaysFlush) | |
| base_logger_stream object constructor More... | |
| void | log (verbosity eVerbosity, const category &category, string_view svFile, string_view svFunction, int nLine, string_view swLogMessage) |
| Output to stream. More... | |
| void | register_unit (string_view svUnitName, const log_unit_info &unit) noexcept |
| Register logger unit. More... | |
| void | deregister_unit (string_view svUnitName) noexcept |
| Deregister logger unit. More... | |
| std::optional< log_unit > | get_unit_info (const category &category, verbosity eVerbosity, string_view svFile, string_view svFunction) const noexcept |
| Try to find log unit info based on trace location info. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from qx::base_logger_stream | |
| static void | append_time_string (string &sTime, char_type chDateDelimiter, char_type chTimeDelimiter) noexcept |
| Format time string to the buffer. More... | |
Protected Member Functions inherited from qx::base_logger_stream | |
| logger_buffer & | get_log_buffer () noexcept |
| Get string buffers. More... | |
| virtual void | format_line (logger_buffer &buffers, verbosity eVerbosity, const category &category, string_view svFile, string_view svFunction, int nLine, string_view swLogMessage) noexcept |
| Format logger line. More... | |
Logger stream for std::cout output.
Definition at line 27 of file cout_logger_stream.h.
|
inline |
cout_logger_stream object constructor
| bAlwaysFlush | - true if need to flush after every output, decreases performance |
| bUseColors | - use color when output is not info |
| bDisableStdioSync | - don't synchronize to the standard C streams after each input/output operation |
| bUntieCin | - untie cin from cout |
Definition at line 13 of file cout_logger_stream.inl.
|
inlineoverridevirtual |
Proceed stream logging.
| svMessage | - message string |
| logUnit | - log unit info |
| colors | - color ranges to colorize output |
| eVerbosity | - this message verbosity |
Implements qx::base_logger_stream.
Definition at line 45 of file cout_logger_stream.inl.
|
inlinenoexcept |
Set whether cout output should be colored.
| bUsingColors | - true if cout output should be colored |
Definition at line 110 of file cout_logger_stream.inl.