BloombergLP::ball::FileObserver::FileObserver

Create a file observer using the specified basicAllocator.

Synopsis

Declared in <ball_fileobserver.h>

explicit
FileObserver(bslma::Allocator* basicAllocator);

Description

Create a file observer that publishes log records to stdout if their severity is at least as severe as Severity::e_WARN, and has file logging initially disabled. Use the specified basicAllocator 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).

Parameters

NameDescription
basicAllocatormemory allocator; null uses the default