Module sink

Module sink 

Source
Expand description

Provides sinks to flexibly output log messages to specified targets.

§Sink

Sinks are the objects that actually write logs to their targets. Each sink should be responsible for only single target (e.g file, console, database), and each sink has its own private instance of Formatter object.

A sink has its own level filter that is not shared with the logger, and a Logger can combine multiple Sinks.

§Combined sink

A combined sink is also a sink, but instead of having its own target and formatter, it combines other sinks (as sub-sinks).

Operations on a combined sink will be forwarded to its sub-sinks according to the implementation.

Structs§

AndroidSinkAndroid and native and android-ndk
A sink with Android NDK API __android_log_write as the target.
AndroidSinkBuilderAndroid and native and android-ndk
AsyncPoolSink
A combined sink, logging and flushing asynchronously (thread-pool-based).
AsyncPoolSinkBuilder
DedupSink
A combined sink, skip consecutive repeated records.
DedupSinkBuilder
FileSink
A sink with a file as the target.
FileSinkBuilder
JournaldSinkLinux and native and libsystemd
A sink with systemd-journal as the target.
JournaldSinkBuilderLinux and native and libsystemd
RotatingFileSink
A sink with a file as the target, split files according to the rotation policy.
RotatingFileSinkBuilder
SinkProp
Contains definitions of sink properties.
StdStreamSink
A sink with a std stream as the target.
StdStreamSinkBuilder
WinDebugSinkWindows and native
A sink with a win32 API OutputDebugStringW as the target.
WinDebugSinkBuilderWindows and native
WriteSink
A sink that writes log messages into an arbitrary impl Write object.
WriteSinkBuilder

Enums§

AndroidLogTagAndroid and native and android-ndk
Represents how to choose a tag for Android logs.
OverflowPolicymulti-thread
Overflow policy for asynchronous sinks.
RotationPolicy
Rotation policies for RotatingFileSink.
StdStream
An enum representing the available standard streams.

Traits§

GetSinkProp
Represents the getter for the SinkProp inside a sink.
Sink
Represents a sink
SinkPropAccess
Represents getters for properties of a sink.

Type Aliases§

Sinks
Container type for Sinks.