C1Log.ILogSink
interface.C1Log.AddSink
, every log message will be sent to all registered sinks that match the log level filter.
This is useful if you want to, for example, write logs to a file, display them in the console, and send them to a cloud logging service simultaneously.
MinLogLevel
property allows you to filter which log levels your sink will process, but it only supports filtering for all levels at or above a certain severity (e.g., all logs that are Critical
or less severe).Informational
and Critical
), implement the filtering logic inside your sink’s WriteAsync
method.WriteAsync
method is called asynchronously for each log message.