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

Log a formatted message if its severity meets the threshold&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
logFormattedMessage(
    xref:BloombergLP/bsls/LogSeverity/Enum.adoc[bsls::LogSeverity::Enum] severity,
    char const* file,
    int line,
    char const* format, &period;&period;&period;);
----

== Description

If the specified `severity` is at least as severe as `severityThrehold`, invoke the currently installed log message handler with `severity` and the specified `file` and `line`, as well as a message string created by calling `sprintf` on the specified `format` with the specified variadic arguments&semi; otherwise (if `severity` is less severe), this operation has no effect&period; The behavior is undefined unless `0 &lt;&equals; line`, and `format` is a valid `sprintf` format specification for the supplied variadic arguments&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *severity*
| severity of the log record
| *file*
| source file name associated with the record
| *line*
| source line number associated with the record
| *format*
| `printf`&hyphen;style format string for the message
|===


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