BloombergLP::ball::CstdioObserver

This class provides a concrete implementation of the Observer protocol.

Synopsis

Declared in <ball_cstdioobserver.h>

class CstdioObserver
    : public Observer

Description

The publish method of this class outputs the log records that it receives to a FILE * supplied at construction and then flushes the stream.

Base Classes

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

Type Aliases

NameDescription
RecordFormatter LogRecordFunctor is an alias for the type of the functor used for formatting log records to a stream.
allocator_type allocator_type is an alias for the type of allocator used by this class.

Member Functions

NameDescription
CstdioObserver [constructor]Create a cstdio observer that transmits log records to a stream.
~CstdioObserver [destructor] [virtual]Destroy this cstdio 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 formatting functor from the specified scheme-tagged format.
setFormatFunctor Set the record formatting functor used by this observer.
operator BloombergLP::bslmf::NestedTraitDeclaration<CstdioObserver, UsesBslmaAllocator> Declare that this type uses a bslma allocator.

Using Declarations

NameDescription
publish Import the base-class publish overloads.