Skip to content

Commit

Permalink
chore(drive): remove atty due to RUSTSEC-2021-0145
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Aug 23, 2024
1 parent aeb9573 commit 2687b81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/rs-drive-abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features =
"registry",
"tracing-log",
], optional = false }
atty = { version = "0.2.14", optional = false }
tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", version = "1.1.0", tag = "v1.1.0", features = [
"grpc",
] }
Expand Down
8 changes: 4 additions & 4 deletions packages/rs-drive-abci/src/logging/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::logging::{LogConfigs, LogFormat, LogLevel};
use lazy_static::__Deref;
use std::collections::HashMap;
use std::fmt::Debug;
use std::io::Write;
use std::io::{IsTerminal, Write};
use std::sync::Arc;
use std::sync::Mutex;
use tracing_subscriber::fmt;
Expand Down Expand Up @@ -305,9 +305,9 @@ impl Logger {
fn layer(&self) -> Result<impl Layer<Registry>, Error> {
let ansi = self
.color
.unwrap_or(match self.destination.lock().unwrap().deref() {
LogDestinationWriter::StdOut => atty::is(atty::Stream::Stdout),
LogDestinationWriter::StdErr => atty::is(atty::Stream::Stderr),
.unwrap_or_else(|| match self.destination.lock().unwrap().deref() {
LogDestinationWriter::StdOut => std::io::stdout().is_terminal(),
LogDestinationWriter::StdErr => std::io::stderr().is_terminal(),
_ => false,
});

Expand Down

0 comments on commit 2687b81

Please sign in to comment.