pub fn init_logger_with_additional_layer<F, T>(
cfg: LoggerConfig,
build_subscriber: F,
) -> Result<(), Error>where
F: FnOnce() -> T,
T: BuildSubscriberRet,
Expand description
Initialize the logger with the given values for the filter, coloring, and other options env variables.
Additionally add a custom layer to collect logging and tracing events via build_subscriber
,
for example: || Registry::default().with(custom_layer)
.