qxLib
Public Member Functions | List of all members
qx::file_logger_stream Class Reference

Logger stream for file output. More...

#include <file_logger_stream.h>

Inheritance diagram for qx::file_logger_stream:
qx::base_logger_stream

Public Member Functions

 file_logger_stream (bool bAlwaysFlush=false, log_file_policy eLogFilePolicy=log_file_policy::append, string_view svFileName=L"application")
 file_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...
 
- 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_unitget_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_bufferget_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...
 

Detailed Description

Logger stream for file output.

~

Author
Khrapov
Date
28.07.2021

Definition at line 35 of file file_logger_stream.h.

Constructor & Destructor Documentation

◆ file_logger_stream()

qx::file_logger_stream::file_logger_stream ( bool  bAlwaysFlush = false,
log_file_policy  eLogFilePolicy = log_file_policy::append,
string_view  svFileName = L"application" 
)
inline

file_logger_stream object constructor

Parameters
bAlwaysFlush- true if need to flush after every output, decreases performance
eLogFilePolicy- policy to use
svFileName- log file name

Definition at line 13 of file file_logger_stream.inl.

Member Function Documentation

◆ do_log()

void qx::file_logger_stream::do_log ( string_view  svMessage,
const log_unit logUnit,
const std::vector< logger_color_range > &  colors,
verbosity  eVerbosity 
)
inlineoverridevirtual

Proceed stream logging.

Parameters
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 74 of file file_logger_stream.inl.


The documentation for this class was generated from the following files: