[#BloombergLP-ball-Log]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::Log
:relfileprefix: ../../
:mrdocs:

This `struct` provides a namespace for a suite of utility functions that simplify usage of the `ball&lowbar;loggermanager` component&period; The direct use of these utility functions is _strongly_ discouraged&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct Log;
----

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/Log/categoryHolderIfEnabled.adoc[`categoryHolderIfEnabled`] 
| Return the specified `categoryHolder` if the severity warrants logging according to the specified `t&lowbar;SEVERITY` and `categoryHolder`, and 0 otherwise&period;
| xref:BloombergLP/ball/Log/format.adoc[`format`] 
| Fill the specified `buffer` with at most the specified `numBytes` characters produced by formatting the variable argument list according to the specified `printf`&hyphen;style `format` argument&semi; return the number of characters in the resulting formatted string&period; The last character placed into `buffer` is always a null terminator (leaving at most `numBytes &hyphen; 1` bytes of formatted data)&period; If `numBytes` is insufficient for the entire formatted string, this method fills `buffer` with the initial `numBytes &hyphen; 1` bytes of formatted data followed by a null terminator and returns &hyphen;1&period; Note that with the exception of the return value, the behavior of this function exactly matches that of the C99 function `snprintf`&period; Also note that `snprintf` is not part of standard C&plus;&plus;&hyphen;98, so its functionality is provided here&period;
| xref:BloombergLP/ball/Log/getRecord.adoc[`getRecord`] 
| Return the address of a modifiable record having the specified `fileName` and `lineNumber` attributes&period; The memory for the record will be supplied by the allocator held by the logger manager singleton if the specified `category` is non&hyphen;null, or by the currently installed default allocator otherwise&period; The behavior is undefined unless the logger manager singleton is initialized when `category` is non&hyphen;null&period; Note that the returned `Record` must subsequently be supplied to a call to the 3&hyphen;argument `logMessage` method&period;
| xref:BloombergLP/ball/Log/isCategoryEnabled.adoc[`isCategoryEnabled`] 
| Return `true` if logging to the category associated with the specified `categoryHolder` at the specified `severity` is enabled, or if `Severity&colon;&colon;e&lowbar;WARN &gt;&equals; severity` and the logger manager singleton is not initialized&semi; return `false` otherwise&period;
| xref:BloombergLP/ball/Log/logMessage-02.adoc[`logMessage`] 
| `logMessage` overloads
| xref:BloombergLP/ball/Log/obtainMessageBuffer-0c.adoc[`obtainMessageBuffer`] 
| `obtainMessageBuffer` overloads
| xref:BloombergLP/ball/Log/releaseMessageBuffer.adoc[`releaseMessageBuffer`] 
| Unlock the specified `mutex` that guards the buffer used for formatting messages in this thread of execution&period; The behavior is undefined unless `mutex` was obtained by a call to `Log&colon;&colon;obtainMessageBuffer` and has not yet been unlocked&period;
| xref:BloombergLP/ball/Log/setCategory-0b.adoc[`setCategory`] 
| `setCategory` overloads
| xref:BloombergLP/ball/Log/setCategoryHierarchically-0b.adoc[`setCategoryHierarchically`] 
| `setCategoryHierarchically` overloads
|===



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