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

Log a record containing the specified `message` text, `fileName`, `lineNumber`, `severity`, and the name of the specified `category`&period; (See the component&hyphen;level documentation of `ball&lowbar;record` for more information on the additional fields that are logged&period;) Store the record in the buffer held by the logger if `severity` is at least as severe as the current &quot;Record&quot; threshold level of `category`&period; Pass the record directly to the registered observer if `severity` is at least as severe as the current &quot;Pass&quot; threshold level of `category`&period; Publish the entire contents of the buffer of the logger if `severity` is at least as severe as the current &quot;Trigger&quot; threshold level of `category`&period; Publish the entire contents of all buffers of all loggers if `severity` is at least as severe as the current &quot;Trigger&hyphen;All&quot; threshold level of `category` (i&period;e&period;, via the callback supplied at construction of the logger manager singleton)&period; This method has no effect if `category` is 0 or `severity` is less severe than each of the threshold levels of `category`&period; The behavior is undefined unless `severity` is in the range `&lsqb;1 &period;&period; 255&rsqb;` and the logger manager singleton is initialized when `category` is non&hyphen;null&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
logMessage(
    xref:BloombergLP/ball/Category.adoc[Category] const* category,
    int severity,
    std::string&lowbar;view const& fileName,
    int lineNumber,
    std::string&lowbar;view const& message);
----


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