[#BloombergLP-ball-FileObserver-2constructor-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FileObserver.adoc[FileObserver]::FileObserver :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<ball_fileobserver.h>` Create a file observer that publishes log records to `stdout` if their severity is at least as severe as the optionally specified `stdoutThreshold` level, and has file logging initially disabled. If `stdoutThreshold` is not specified, log records are published to `stdout` if their severity is at least as severe as `Severity::e_WARN`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. Note that `isPublishInLocalTimeEnabled` returns `false` following construction indicating that the timestamp attribute of published records will be written in UTC time (see `enablePublishInLocalTime`). Also note that independent default record formats are in effect for `stdout` and file logging (see `setLogFormat`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/FileObserver/2constructor-03.adoc[FileObserver](); ---- [.small]#xref:BloombergLP/ball/FileObserver/2constructor-03.adoc[_» more..._]# Same as the default constructor, using the specified `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/FileObserver/2constructor-01.adoc[FileObserver](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator); ---- [.small]#xref:BloombergLP/ball/FileObserver/2constructor-01.adoc[_» more..._]# Create a file observer having the specified `stdoutThreshold` and `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/ball/FileObserver/2constructor-00.adoc[FileObserver]( xref:BloombergLP/ball/Severity/Level.adoc[Severity::Level] stdoutThreshold, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/ball/FileObserver/2constructor-00.adoc[_» more..._]# 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. The timestamp attribute of published records is written in local time if the specified `publishInLocalTime` flag is `true`, and in UTC time otherwise. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. Note that following construction independent default record formats are in effect for `stdout` and file logging (see `setLogFormat`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/FileObserver/2constructor-09.adoc[FileObserver]( xref:BloombergLP/ball/Severity/Level.adoc[Severity::Level] stdoutThreshold, bool publishInLocalTime, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/ball/FileObserver/2constructor-09.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#