[#BloombergLP-ball-FileObserver-2constructor-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FileObserver.adoc[FileObserver]::FileObserver
:relfileprefix: ../../../
:mrdocs:

Create a file observer with local&hyphen;time and threshold options&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
FileObserver(
    xref:BloombergLP/ball/Severity/Level.adoc[Severity::Level] stdoutThreshold,
    bool publishInLocalTime,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Create a file observer that publishes log records to `stdout` if their severity is at least as severe as the specified `stdoutThreshold` level, and has file logging initially disabled&period; The timestamp attribute of published records is written in local time if the specified `publishInLocalTime` flag is `true`, and in UTC time otherwise&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; Note that following construction independent default record formats are in effect for `stdout` and file logging (see `setLogFormat`)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stdoutThreshold*
| minimum severity for records logged to `stdout`
| *publishInLocalTime*
| whether timestamps are written in local time
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


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