pub fn get_subscriber<Sink>(
env_filter: String,
sink: Sink,
) -> impl Subscriber + Send + SyncExpand description
Returns a Subscriber that can be used for logging and tracing.
This function configures an EnvFilter to filter log events based on
environment variables or a default filter string, and sets up a fmt layer
for formatting and outputting log records to a specified sink.
§Arguments
env_filter- A string defining the default logging level and filter directives.sink- A type that implementsMakeWritertrait, determining where the logs are written (e.g.,stdout,stderr, a file).
§Type Parameters
Sink- A type that can createstd::io::Writeinstances, enabling flexible log output.
§Returns
An impl Subscriber + Send + Sync configured with the specified filter and sink.