|
carl
25.04
Computer ARithmetic Library
|
Formats a log messages. More...
#include <Formatter.h>
Public Member Functions | |
| virtual | ~Formatter () noexcept=default |
| virtual void | configure (const Filter &f) noexcept |
| Extracts the maximum width of a channel to optimize the formatting. More... | |
| virtual void | prefix (std::ostream &os, const std::string &channel, LogLevel level, const RecordInfo &info) |
| Prints the prefix of a log message, i.e. More... | |
| virtual void | suffix (std::ostream &os) |
| Prints the suffix of a log message, i.e. More... | |
Data Fields | |
| bool | printInformation = true |
| Print information like log level, file etc. More... | |
Private Attributes | |
| std::size_t | channelwidth = 10 |
| Width of the longest channel. More... | |
Formats a log messages.
Definition at line 17 of file Formatter.h.
|
virtualdefaultnoexcept |
|
inlinevirtualnoexcept |
Extracts the maximum width of a channel to optimize the formatting.
| f | Filter. |
Definition at line 30 of file Formatter.h.
|
inlinevirtual |
Prints the prefix of a log message, i.e.
everything that goes before the message given by the user, to the output stream.
| os | Output stream. |
| channel | Channel name. |
| level | LogLevel. |
| info | Auxiliary information. |
Definition at line 42 of file Formatter.h.

|
inlinevirtual |
Prints the suffix of a log message, i.e.
everything that goes after the message given by the user, to the output stream. Usually, this is only a newline.
| os | Output stream. |
Definition at line 67 of file Formatter.h.
|
private |
Width of the longest channel.
Definition at line 19 of file Formatter.h.
| bool carl::logging::Formatter::printInformation = true |
Print information like log level, file etc.
Definition at line 22 of file Formatter.h.