Enrollment 28.2.0
Loading...
Searching...
No Matches
FormattingComposer Class Reference

Compose message from variadic arguments. More...

#include <FormattingLogger.h>

Collaboration diagram for FormattingComposer:

Public Member Functions

template<typename... Args>
 FormattingComposer (const char *format, Args &&... arguments)
 Constructs FormattingComposer.
const char * Compose () final
 Compose message from stored references to variadic arguments.

Detailed Description

Compose message from variadic arguments.

It stores reference to data to be logged in FormattingComposer::FormattingComposer and compose message when function FormattingComposer::Compose is called.

Warning
Stored references MUST exists in time of Compose call.
The implementation is not thread safe. It should be instantiated once per each thread or on function stack.
Note
Only for C++

Constructor & Destructor Documentation

◆ FormattingComposer()

template<typename... Args>
FormattingComposer ( const char * format,
Args &&... arguments )
inlineexplicit

Constructs FormattingComposer.

Parameters
formataccepts all specifiers as defined for printf function. Plus it defines own one 'v'. Argument specified with 'v' specifier is passed to Writer.
argumentsvariadic arguments that MUST correspond to format

Member Function Documentation

◆ Compose()

const char * Compose ( )
inlinefinalvirtual

Compose message from stored references to variadic arguments.

Returns
message

Implements LogMessage.


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