Go to the source code of this file.
|
| template<class char_t , class traits_t > |
| compile_pattern_result | qx::compile_pattern (basic_string< char_t, traits_t > &sPattern) noexcept |
| | Compile an fmt pattern with named arguments into replacement fields. More...
|
| |
| void | qx::format_log_specifiers (string &sStorage, string_view svPattern, const category &category, verbosity eVerbosity, std::thread::id threadId, std::chrono::system_clock::time_point messageTime, string_view svFile, string_view svFunction, int nLine, string_view svMessage) |
| | Format sStorage using qx::logger_specifiers. More...
|
| |
- Author
- Khrapov
- Date
- 9.09.2026
- Copyright
- © Nick Khrapov, 2026. All right reserved.
Definition in file logger_specifiers.h.
◆ compile_pattern()
template<class char_t , class traits_t >
| compile_pattern_result qx::compile_pattern |
( |
basic_string< char_t, traits_t > & |
sPattern | ) |
|
|
noexcept |
Compile an fmt pattern with named arguments into replacement fields.
This function is required because std format doesn't support named arguments. This function doesn't allocate.
- Template Parameters
-
| char_t | - char type (char, wchar_t, etc) |
| traits_t | - char traits. |
- See also
- string_traits.h
- Parameters
-
| sPattern | - fmt pattern that must have only arguments from logger_specifiers. One type may be absent or present multiple times. You can use any format specifiers. The result will be in the same string. |
- Return values
-
| - | Compilation result. If != ok, sPattern is considered invalid. |
Definition at line 48 of file logger_specifiers.inl.
◆ format_log_specifiers()
| void qx::format_log_specifiers |
( |
string & |
sStorage, |
|
|
string_view |
svPattern, |
|
|
const category & |
category, |
|
|
verbosity |
eVerbosity, |
|
|
std::thread::id |
threadId, |
|
|
std::chrono::system_clock::time_point |
messageTime, |
|
|
string_view |
svFile, |
|
|
string_view |
svFunction, |
|
|
int |
nLine, |
|
|
string_view |
svMessage |
|
) |
| |
|
inline |
Format sStorage using qx::logger_specifiers.
- Parameters
-
| sStorage | - where to put the result |
| svPattern | - formatting pattern, see qx::logger_specifiers |
| category | - code category |
| eVerbosity | - message verbosity |
| threadId | - thread where the log is called |
| messageTime | - message creation time |
| svFile | - file name string |
| svFunction | - function name string |
| nLine | - code line number |
| svMessage | - user message string |
Definition at line 178 of file logger_specifiers.inl.