This class provides a value‐semantic log record formatter that holds a printf‐style format specification and a timestamp offset.

Synopsis

Declared in <ball_recordstringformatter.h>

class RecordStringFormatter;

Description

The overloaded operator() provided by the class formats a given record according to the format specification and outputs the formatted result to a given stream. The timestamp offset of the record formatter is added to each timestamp that is output to the stream.

Type Aliases

Name

Description

allocator_type

This typedef is an alias for the allocator used by this object.

Member Functions

Name

Description

RecordStringFormatter [constructor]

Constructors

operator=

Assign to this record formatter the value of the specified rhs.

disablePublishInLocalTime

Disable adjustment of timestamps to the current local time.

enablePublishInLocalTime

Enable adjustment of the timestamp attribute to the current local time. This method has no effect if adjustment to the current local time is already enabled.

format

Return the format specification of this record formatter.

get_allocator

Return the allocator used by this object to supply memory.

isPublishInLocalTimeEnabled

Return true if this formatter adjusts the timestamp attribute to the current local time, and false otherwise.

operator()

Format record to stream using this formatter's format specification.

setFormat

Set the format specification of this record formatter to format.

setTimestampOffset

Set the timestamp offset of this record formatter to offset.

timestampOffset

Return a reference to the non‐modifiable timestamp offset of this record formatter.

operator BloombergLP::bslmf::NestedTraitDeclaration<RecordStringFormatter, UsesBslmaAllocator>

Declare that this type uses a bslma allocator.

Static Member Functions

Name

Description

loadTextSchemeFormatter

Configure a "text" scheme formatter and load it into output.

Static Data Members

Name

Description

k_BASIC_ATTRIBUTE_FORMAT

A simple standard record format that renders ball::Attribute values.

k_DEFAULT_FORMAT

The default log format specification used by RecordStringFormatter.

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs do not have the same value.

operator==

Return true if the specified lhs and rhs have the same value.

Created with MrDocs