BloombergLP::ball::Log_Formatter

This class provides an aggregate of several objects relevant to the logging of a message via the printf-style macros: ` - record to be logged - category to which to log the record - severity at which to log the record - buffer in which the user log message is formatted ` As a side-effect of creating an object of this class, the record is constructed, and the buffer is obtained. As a side-effect of destroying the object, the record is formatted, using the buffer, and logged.

Synopsis

Declared in <ball_log.h>

class Log_Formatter;

Description

This class should not be used directly by client code. It is an implementation detail of the macros provided by this component.

Member Functions

NameDescription
Log_Formatter [constructor]Create a logging formatter that holds (1) the specified category and severity, (2) a record that is created from the specified fileName and lineNumber, and (3) a buffer into which the log message is formatted.
~Log_Formatter [destructor]Log the record held by this logging formatter to the held category (as returned by category) at the held severity (as returned by severity), and destroy this logging formatter.
category Return the address of the non-modifiable category held by this logging formatter.
messageBuffer Return the address of the modifiable buffer held by this logging formatter. The address remains valid until this logging formatter is destroyed.
messageBufferLen Return the length (in bytes) of the buffer held by this logging formatter.
record record overloads
severity Return the severity held by this logging formatter.