Skip to content

Commit

Permalink
Deprecate Target::Pipe since it is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Sep 17, 2022
1 parent ade9f7f commit 26d4a47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fmt/writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ pub enum Target {
/// Logs will be sent to standard error.
Stderr,
/// Logs will be sent to a custom pipe.
#[deprecated = "\
This functionality is [broken](https://github.com/env-logger-rs/env_logger/issues/208) \
and nobody is working on fixing it\
"]
Pipe(Box<dyn io::Write + Send + 'static>),
}

Expand All @@ -37,6 +41,7 @@ impl fmt::Debug for Target {
match self {
Self::Stdout => "stdout",
Self::Stderr => "stderr",
#[allow(deprecated)]
Self::Pipe(_) => "pipe",
}
)
Expand All @@ -60,6 +65,7 @@ impl From<Target> for WritableTarget {
match target {
Target::Stdout => Self::Stdout,
Target::Stderr => Self::Stderr,
#[allow(deprecated)]
Target::Pipe(pipe) => Self::Pipe(Box::new(Mutex::new(pipe))),
}
}
Expand Down

0 comments on commit 26d4a47

Please sign in to comment.