Create a ObserverFormatterImp instance that formats log records using the specified format and timezoneDefault.

Synopsis

Declared in <ball_observerformatterimp.h>

explicit
ObserverFormatterImp(
    std::string_view const& format,
    TimezoneEnum timezoneDefault,
    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

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

Created with MrDocs