[#absl-StatusBuilder-OnlyOutputToSink-04]
= xref:absl.adoc[absl]::xref:absl/StatusBuilder.adoc[StatusBuilder]::OnlyOutputToSink
:relfileprefix: ../../
:mrdocs:

Mutates the builder so that the result status will only be logged to the provided `sink` when this builder is converted to a status&period;

== Synopsis

Declared in `&lt;absl&sol;status&sol;status&lowbar;builder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
xref:absl/StatusBuilder.adoc[StatusBuilder]&&
OnlyOutputToSink(xref:absl/LogSink.adoc[absl::LogSink]* sink) &amp;&amp;;
----

== Description

Overwrites any sink set prior&period; The provided `sink` must point to a valid object by the time this builder is converted to a status&period; Has no effect if this builder is not configured to log by calling any of the LogXXX methods&period;

== Return Value

`&ast;this` to allow method chaining&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *sink*
| The log sink to exclusively receive the result status&period;
|===


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