Constructors
Synopses
Declared in <ball_asyncfileobserver.h>
Create an async file observer that asynchronously 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. Records received by the publish method are appended to a queue having a maximum (fixed) length of 8192, and published later by an independent publication thread. All records received while the queue is full are discarded. (See {Log Record Queue} for further information.) 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).
explicit
AsyncFileObserver(bslma::Allocator* basicAllocator = 0);
Create an async file observer with the specified stdoutThreshold.
explicit
AsyncFileObserver(
Severity::Level stdoutThreshold,
bslma::Allocator* basicAllocator = 0);
Create an async file observer that asynchronously 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. Records received by the publish method are appended to a queue having a maximum (fixed) length of 8192, and published later by an independent publication thread. All records received while the queue is full are discarded. (See {Log Record Queue} for further information.) Note that independent default record formats are in effect for stdout and file logging (see setLogFormat).
AsyncFileObserver(
Severity::Level stdoutThreshold,
bool publishInLocalTime,
bslma::Allocator* basicAllocator = 0);
Create an async file observer that asynchronously 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. Records received by the publish method are appended to a queue having the specified (fixed) maxRecordQueueSize, and published later by an independent publication thread. Optionally specify a dropRecordsOnFullQueueThreshold indicating the severity threshold below which records received when the queue is full will be discarded; records received whose severity is at least as severe as this threshold will block the calling thread if the queue is full, until space is available. If dropRecordsOnFullQueueThreshold is not specified, all records received while the queue is full are discarded. (See {Log Record Queue} for further information.) Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. Note that independent default record formats are in effect for stdout and file logging (see setLogFormat).
AsyncFileObserver(
Severity::Level stdoutThreshold,
bool publishInLocalTime,
int maxRecordQueueSize,
bslma::Allocator* basicAllocator = 0);
Same as the preceding overload, additionally taking the specified dropRecordsOnFullQueueThreshold.
AsyncFileObserver(
Severity::Level stdoutThreshold,
bool publishInLocalTime,
int maxRecordQueueSize,
Severity::Level dropRecordsOnFullQueueThreshold,
bslma::Allocator* basicAllocator = 0);
Created with MrDocs