[#absl-LogSink] = xref:absl.adoc[absl]::LogSink :relfileprefix: ../ :mrdocs: `absl::LogSink` is an interface which can be extended to intercept and process particular messages (with `LOG.ToSinkOnly()` or `LOG.ToSinkAlso()`) or all messages (if registered with `absl::AddLogSink`). Implementations must not take any locks that might be held by the `LOG` caller. == Synopsis Declared in `<absl/log/log_sink.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class LogSink; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:absl/LogSink/2destructor.adoc[`~LogSink`] [.small]#[destructor]# [.small]#[virtual]# | Destroys the log sink. | xref:absl/LogSink/Flush.adoc[`Flush`] [.small]#[virtual]# | Sinks that buffer messages should override this method to flush the buffer and return. `Flush` must be thread‐safe. | xref:absl/LogSink/Send.adoc[`Send`] [.small]#[virtual]# | `Send` is called synchronously during the log statement. `Send` must be thread‐safe. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:absl/LogSink/2constructor-0a.adoc[`LogSink`] [.small]#[constructor]# | Constructors | xref:absl/LogSink/operator_assign.adoc[`operator=`] | Implementations may be copyable and/or movable. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:absl/AddLogSink.adoc[`AddLogSink`] | Adds a `absl::LogSink` as a consumer of logging data. | xref:absl/RemoveLogSink.adoc[`RemoveLogSink`] | Removes a `absl::LogSink` as a consumer of logging data. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#