absl::LogSink

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>

class LogSink;

Member Functions

NameDescription
~LogSink [destructor] [virtual]Destroys the log sink.
Flush [virtual]Sinks that buffer messages should override this method to flush the buffer and return. Flush must be thread-safe.
Send [virtual]Send is called synchronously during the log statement. Send must be thread-safe.

Protected Member Functions

NameDescription
LogSink [constructor]Constructors
operator= Implementations may be copyable and/or movable.

Non-Member Functions

NameDescription
AddLogSinkAdds a absl::LogSink as a consumer of logging data.
RemoveLogSinkRemoves a absl::LogSink as a consumer of logging data.