[#BloombergLP-ball-ObserverFormatterImp-2constructor] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/ObserverFormatterImp.adoc[ObserverFormatterImp]::ObserverFormatterImp :relfileprefix: ../../../ :mrdocs: Create a `ObserverFormatterImp` instance that formats log records using the specified `format` and `timezoneDefault`. == Synopsis Declared in `<ball_observerformatterimp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit ObserverFormatterImp( std::string_view const& format, xref:BloombergLP/ball/ObserverFormatterImp.adoc[TimezoneEnum] timezoneDefault, xref:BloombergLP/ball/ObserverFormatterImp/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- == Description It is strongly advised to specify UTC for timezoneDefault. Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory; otherwise, the default allocator is used. The behavior is undefined unless `format` is a valid format string (either one that starts with a scheme or a "text" scheme format). Note that not giving a valid default format string by the observer will result in no logging output if no valid format is set afterwards, so it is a serious error. == Parameters [cols="1,4"] |=== | Name| Description | *format* | format configuration string used to create the formatter | *timezoneDefault* | default time zone for timestamps without one | *allocator* | allocator used to supply memory |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#