feat: IsTerminal in std since v1.70

This commit is contained in:
zonyitoo
2024-02-16 15:16:38 +08:00
parent f16615e79e
commit 186c0883e7
3 changed files with 3 additions and 15 deletions

12
Cargo.lock generated
View File

@@ -1437,17 +1437,6 @@ dependencies = [
"ipnet",
]
[[package]]
name = "is-terminal"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "itoa"
version = "1.0.10"
@@ -2801,7 +2790,6 @@ dependencies = [
"env_logger",
"futures",
"ipnet",
"is-terminal",
"jemallocator",
"json5",
"libc",

View File

@@ -96,7 +96,7 @@ dns-over-https = ["shadowsocks-service/dns-over-https"]
dns-over-h3 = ["shadowsocks-service/dns-over-h3"]
# Enable logging output
logging = ["log4rs", "tracing", "tracing-subscriber", "is-terminal", "time"]
logging = ["log4rs", "tracing", "tracing-subscriber", "time"]
# Enable DNS-relay
local-dns = ["local", "shadowsocks-service/local-dns"]
@@ -172,7 +172,6 @@ tracing-subscriber = { version = "0.3", optional = true, features = [
"time",
"local-time",
] }
is-terminal = { version = "0.4.12", optional = true }
time = { version = "0.3", optional = true }
serde = { version = "1.0", features = ["derive"] }

View File

@@ -1,6 +1,7 @@
//! Logging facilities with tracing
use is_terminal::IsTerminal;
use std::io::IsTerminal;
use time::UtcOffset;
use tracing::level_filters::LevelFilter;
use tracing_subscriber::{fmt::time::OffsetTime, EnvFilter, FmtSubscriber};