Mutates the builder so that the result status will only be logged to the provided sink when this builder is converted to a status.

Synopsis

Declared in <absl/status/status_builder.h>

StatusBuilder&
OnlyOutputToSink(absl::LogSink* sink) &;

Description

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

Return Value

*this to allow method chaining.

Parameters

Name

Description

sink

The log sink to exclusively receive the result status.

Created with MrDocs