Create a record formatter with the specified format and local‐time flag.

Synopsis

Declared in <ball_recordstringformatter.h>

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

Description

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.

Parameters

Name

Description

format

printf‐style format specification

publishInLocalTime

whether to format timestamps in local time

allocator

allocator used to supply memory

Created with MrDocs