Skip to main content

new_logger_with_writer

Function new_logger_with_writer 

Source
pub fn new_logger_with_writer(
    cfg: &Config,
    w: Box<dyn Write + Send>,
) -> Result<Dispatch, LoggerError>
Expand description

Ported from NewLoggerWithWriter. Unlike new_logger, the caller already owns w and is responsible for flushing/closing it; this function only wraps it in the same shared, lockable handle LoggerSubscriber needs to be usable concurrently with any other clone of the returned dispatch.