Constructors

Synopses

Declared in <ball_recordstringformatter.h>

Create a record formatter having a default format specification and a timestamp offset of 0. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory. If basicAllocator is not supplied or 0, the currently installed default allocator is used. The default format specification is: ` "n%d %p:%t %s %f:%l %c %m %un" `

explicit
RecordStringFormatter(allocator_type const& allocator = allocator_type());

Same as the preceding overload, using the specified basicallocator.

explicit
RecordStringFormatter(bslma::Allocator* basicallocator);

Create a record formatter having a default format specification, and if the specified publishInLocalTime flag is true, format the timestamp of each logged record in the local time of the current task, and format the timestamp in UTC otherwise. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used. The default format specification is: ` "n%d %p:%t %s %f:%l %c %m %un" ` Note that local time offsets are calculated for the timestamp of each formatted record and so track transitions into and out of Daylight Saving Time.

explicit
RecordStringFormatter(
    bool publishInLocalTime,
    allocator_type const& allocator = allocator_type());

Create a record formatter having a default format specification and the specified timestamp offset. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used. The default format specification is: ` "n%d %p:%t %s %f:%l %c %m %un" `

explicit
RecordStringFormatter(
    bdlt::DatetimeInterval const& offset,
    allocator_type const& allocator = allocator_type());

Create a record formatter initialized to the value of the specified original record formatter. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.

RecordStringFormatter(
    RecordStringFormatter const& original,
    allocator_type const& allocator = allocator_type());

Same as the preceding overload, using the specified format.

explicit
RecordStringFormatter(
    std::string_view const& format,
    allocator_type const& allocator = allocator_type());

Create a record formatter having the specified format specification and a timestamp offset of 0. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory. If basicAllocator is not supplied or 0, the currently installed default allocator is used.

explicit
RecordStringFormatter(
    char const* format,
    allocator_type const& allocator = allocator_type());

Same as the preceding overload, using the specified format and basicAllocator.

RecordStringFormatter(
    char const* format,
    bslma::Allocator* basicAllocator);

Create a record formatter having the specified format specification, and if the specified publishInLocalTime flag is true, format the timestamp of each log in the local time of the current task, and format the timestamp in UTC otherwise. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used. Note that local time offsets are calculated for the timestamp of each formatted record and so track transitions into and out of Daylight Saving Time.

RecordStringFormatter(
    char const* format,
    bool publishInLocalTime,
    allocator_type const& allocator = allocator_type());

Create a record formatter having the specified format specification and the specified timestamp offset. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.

RecordStringFormatter(
    char const* format,
    bdlt::DatetimeInterval const& offset,
    allocator_type const& allocator = allocator_type());

Created with MrDocs