[#BloombergLP-ball-Log_Formatter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::Log&lowbar;Formatter
:relfileprefix: ../../
:mrdocs:

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

== Synopsis

Declared in `&lt;ball&lowbar;log&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Log&lowbar;Formatter;
----

== Description

This class should _not_ be used directly by client code&period; It is an implementation detail of the macros provided by this component&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/Log_Formatter/2constructor.adoc[`Log&lowbar;Formatter`]         [.small]#[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&period;
| xref:BloombergLP/ball/Log_Formatter/2destructor.adoc[`&#126;Log&lowbar;Formatter`] [.small]#[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&period;
| xref:BloombergLP/ball/Log_Formatter/category.adoc[`category`] 
| Return the address of the non&hyphen;modifiable category held by this logging formatter&period;
| xref:BloombergLP/ball/Log_Formatter/messageBuffer.adoc[`messageBuffer`] 
| Return the address of the modifiable buffer held by this logging formatter&period; The address remains valid until this logging formatter is destroyed&period;
| xref:BloombergLP/ball/Log_Formatter/messageBufferLen.adoc[`messageBufferLen`] 
| Return the length (in bytes) of the buffer held by this logging formatter&period;
| xref:BloombergLP/ball/Log_Formatter/record-0d.adoc[`record`] 
| `record` overloads
| xref:BloombergLP/ball/Log_Formatter/severity.adoc[`severity`] 
| Return the severity held by this logging formatter&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
