BloombergLP::ball::StreamObserver

This class provides a concrete implementation of the Observer protocol.

Synopsis

Declared in <ball_streamobserver.h>

class StreamObserver
    : public Observer

Description

The publish method of this class outputs the log records that it receives to an instance of bsl::ostream supplied at construction.

Base Classes

NameDescription
ObserverThis class provides a protocol for receiving and processing log record output.

Type Aliases

NameDescription
RecordFormatFunctor Alias for the record formatting functor type.
RecordFormatter LogRecordFunctor is an alias for the type of the functor used for formatting log records to a stream.
allocator_type This typedef is an alias for the allocator used by this object.

Member Functions

NameDescription
StreamObserver [constructor]Create a stream observer that transmits log records to stream.
~StreamObserver [destructor] [virtual]Destroy this stream observer.
disablePublishInLocalTime Disable publishing of record timestamps in local time.
enablePublishInLocalTime Enable publishing of record timestamps in local time.
getFormat Return the format config of the last successful setFormat call.
isPublishInLocalTimeEnabled Return true if published timestamps are written in local time.
publish publish overloads
releaseRecords [virtual]Discard any shared reference to a Record object held by this observer.
setFormat Set the stream record format from the specified format string.
setRecordFormatFunctor Set the formatting functor used when writing records to the stream.

Using Declarations

NameDescription
publish Import the base-class publish overloads.