Base class for logger streams.
More...
#include <base_logger_stream.h>
Base class for logger streams.
~
- Author
- Khrapov
- Date
- 28.07.2021
Definition at line 77 of file base_logger_stream.h.
◆ base_logger_stream()
qx::base_logger_stream::base_logger_stream |
( |
bool |
bAlwaysFlush | ) |
|
|
inline |
◆ append_time_string()
void qx::base_logger_stream::append_time_string |
( |
string & |
sTime, |
|
|
char_type |
chDateDelimiter, |
|
|
char_type |
chTimeDelimiter |
|
) |
| |
|
inlinestaticnoexcept |
Format time string to the buffer.
- Parameters
-
sTime | - output time buffer |
chDateDelimiter | - char to use as delimiter in date part |
chTimeDelimiter | - char to use as delimiter in time part |
Definition at line 109 of file base_logger_stream.inl.
◆ deregister_unit()
void qx::base_logger_stream::deregister_unit |
( |
string_view |
svUnitName | ) |
|
|
inlinenoexcept |
Deregister logger unit.
- Parameters
-
svUnitName | - unit name (category name, file or function) |
Definition at line 74 of file base_logger_stream.inl.
◆ format_line()
void qx::base_logger_stream::format_line |
( |
logger_buffer & |
buffers, |
|
|
verbosity |
eVerbosity, |
|
|
const category & |
category, |
|
|
string_view |
svFile, |
|
|
string_view |
svFunction, |
|
|
int |
nLine, |
|
|
string_view |
swLogMessage |
|
) |
| |
|
inlineprotectedvirtualnoexcept |
Format logger line.
- Parameters
-
buffers | - string buffers to reduce num of allocations |
eVerbosity | - message verbosity |
category | - code category |
svFile | - file name string |
svFunction | - function name string |
nLine | - code line number |
swLogMessage | - formatted log line |
Definition at line 138 of file base_logger_stream.inl.
◆ get_log_buffer()
◆ get_unit_info()
std::optional< log_unit > qx::base_logger_stream::get_unit_info |
( |
const category & |
category, |
|
|
verbosity |
eVerbosity, |
|
|
string_view |
svFile, |
|
|
string_view |
svFunction |
|
) |
| const |
|
inlinenoexcept |
Try to find log unit info based on trace location info.
- Parameters
-
category | - code category |
eVerbosity | - message verbosity |
svFile | - file string |
svFunction | - function string |
- Return values
-
Definition at line 79 of file base_logger_stream.inl.
◆ log()
void qx::base_logger_stream::log |
( |
verbosity |
eVerbosity, |
|
|
const category & |
category, |
|
|
string_view |
svFile, |
|
|
string_view |
svFunction, |
|
|
int |
nLine, |
|
|
string_view |
swLogMessage |
|
) |
| |
|
inline |
Output to stream.
- Template Parameters
-
char_t | - char type, typically char or wchar_t |
- Parameters
-
eVerbosity | message verbosity |
category | - code category |
svFile | - file name string |
svFunction | - function name string |
nLine | - code line number |
swLogMessage | - formatted log line |
Definition at line 20 of file base_logger_stream.inl.
◆ register_unit()
void qx::base_logger_stream::register_unit |
( |
string_view |
svUnitName, |
|
|
const log_unit_info & |
unit |
|
) |
| |
|
inlinenoexcept |
Register logger unit.
- Parameters
-
svUnitName | - unit name (category name, file or function) |
unit | - unit info |
Definition at line 68 of file base_logger_stream.inl.
The documentation for this class was generated from the following files: