[#BloombergLP-ball-CstdioObserver]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::CstdioObserver
:relfileprefix: ../../
:mrdocs:

This class provides a concrete implementation of the `Observer` protocol&period;

== Synopsis

Declared in `&lt;ball&lowbar;cstdioobserver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CstdioObserver
    : public xref:BloombergLP/ball/Observer.adoc[Observer]
----

== Description

The `publish` method of this class outputs the log records that it receives to a `FILE &ast;` supplied at construction and then flushes the stream&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/ball/Observer.adoc[Observer]`
| This class provides a protocol for receiving and processing log record output&period;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CstdioObserver/RecordFormatter.adoc[`RecordFormatter`] 
| `LogRecordFunctor` is an alias for the type of the functor used for formatting log records to a stream&period;
| xref:BloombergLP/ball/CstdioObserver/allocator_type.adoc[`allocator&lowbar;type`] 
| `allocator&lowbar;type` is an alias for the type of allocator used by this class&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CstdioObserver/2constructor.adoc[`CstdioObserver`]         [.small]#[constructor]#
| Create a cstdio observer that transmits log records to a stream&period;
| xref:BloombergLP/ball/CstdioObserver/2destructor.adoc[`&#126;CstdioObserver`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this cstdio observer&period;
| xref:BloombergLP/ball/CstdioObserver/disablePublishInLocalTime.adoc[`disablePublishInLocalTime`] 
| Disable publishing of record timestamps in local time&period;
| xref:BloombergLP/ball/CstdioObserver/enablePublishInLocalTime.adoc[`enablePublishInLocalTime`] 
| Enable publishing of record timestamps in local time&period;
| xref:BloombergLP/ball/CstdioObserver/getFormat.adoc[`getFormat`] 
| Return the format config of the last successful `setFormat` call&period;
| xref:BloombergLP/ball/CstdioObserver/isPublishInLocalTimeEnabled.adoc[`isPublishInLocalTimeEnabled`] 
| Return `true` if published timestamps are written in local time&period;
| xref:BloombergLP/ball/CstdioObserver/publish-08.adoc[`publish`] 
| `publish` overloads
| xref:BloombergLP/ball/CstdioObserver/releaseRecords.adoc[`releaseRecords`]  [.small]#[virtual]#
| Discard any shared reference to a `Record` object held by this observer&period;
| xref:BloombergLP/ball/CstdioObserver/setFormat.adoc[`setFormat`] 
| Set the formatting functor from the specified scheme&hyphen;tagged format&period;
| xref:BloombergLP/ball/CstdioObserver/setFormatFunctor.adoc[`setFormatFunctor`] 
| Set the record formatting functor used by this observer&period;
| xref:BloombergLP/ball/CstdioObserver/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;CstdioObserver, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Using Declarations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CstdioObserver/publish-02.adoc[`publish`] 
| Import the base&hyphen;class `publish` overloads&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
