[#BloombergLP-ball-RecordStringFormatter-2constructor-0e5] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/RecordStringFormatter.adoc[RecordStringFormatter]::RecordStringFormatter :relfileprefix: ../../../ :mrdocs: 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" ` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/RecordStringFormatter/2constructor-0b8.adoc[RecordStringFormatter](xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-0b8.adoc[_» more..._]# Same as the preceding overload, using the specified `basicallocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/RecordStringFormatter/2constructor-0b9.adoc[RecordStringFormatter](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicallocator); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-0b9.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/RecordStringFormatter/2constructor-00.adoc[RecordStringFormatter]( bool publishInLocalTime, xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-00.adoc[_» more..._]# 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" ` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/RecordStringFormatter/2constructor-0ea.adoc[RecordStringFormatter]( xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] const& offset, xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-0ea.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/RecordStringFormatter/2constructor-07.adoc[RecordStringFormatter]( xref:BloombergLP/ball/RecordStringFormatter.adoc[RecordStringFormatter] const& original, xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-07.adoc[_» more..._]# Same as the preceding overload, using the specified `format`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/RecordStringFormatter/2constructor-09.adoc[RecordStringFormatter]( std::string_view const& format, xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-09.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/RecordStringFormatter/2constructor-06.adoc[RecordStringFormatter]( char const* format, xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-06.adoc[_» more..._]# Same as the preceding overload, using the specified `format` and `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/RecordStringFormatter/2constructor-0c.adoc[RecordStringFormatter]( char const* format, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-0c.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/RecordStringFormatter/2constructor-08.adoc[RecordStringFormatter]( char const* format, bool publishInLocalTime, xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-08.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/RecordStringFormatter/2constructor-05.adoc[RecordStringFormatter]( char const* format, xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] const& offset, xref:BloombergLP/ball/RecordStringFormatter/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/ball/RecordStringFormatter/2constructor-05.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#