ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
FormatAutoSizes Struct Reference

Description:

Automatically detected field width and tab-stop positions for the meta-information part as well as the log message part, collected during the run of a software. This struct is used to define an external configuration variable named ALOX/LOGGERNAME/AUTO_SIZES.

This variable can be accessed programatically either with method TextLogger::GetAutoSizes or by accessing the variable's value through the configuration object found in camp singleton alib::ALOX.

For almost all use cases, field Main will work as expected, because the meta-information of log lines usually do not change. In other words, if they get changed, it is a good idea to invoke AutoSizes::Reset on that field.

Field LogMessage with built-in text loggers, is passed to field FormatterPythonStyle::Sizes and thus is used to organize tab-stops and field widths of the log messages itself.
The field may be reset manually after (or before) a coherent set of log messages have been (respectively are to be) written. Such "coherent set" is for example the output of tabular data. If this is not done, a next table containing different data, would not be printed with correct field sizes in case the automatic tab-stops.

Also, it might be reasonable to invoke Consolidate one both objects from time to time, or in certain situations.

See also
Variable ALOX/LOGGERNAME/AUTO_SIZES.

Definition at line 323 of file variables.hpp.

#include <variables.hpp>

Collaboration diagram for FormatAutoSizes:
[legend]

Public Field Index:

AutoSizes LogMessage
 
AutoSizes Main
 The instance used with the meta info format string.
 

Field Details:

◆ LogMessage

AutoSizes LogMessage

An AutoSizes object which is used to format the log message itself.

Note
With the use of class StandardConverter, this instance is passed to the internal instance(s) of the FormatterPythonStyle used.

Definition at line 332 of file variables.hpp.

◆ Main

AutoSizes Main

The instance used with the meta info format string.

Definition at line 326 of file variables.hpp.


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