From 436112cc7b57322ddd9842ec3b54c36dac8ac41e Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 7 Aug 2024 14:50:50 -0700 Subject: [PATCH] Remove logging --- Cargo.lock | 31 ------------------------------- Cargo.toml | 2 -- src/config.rs | 5 +---- src/lib.rs | 1 - src/run.rs | 9 --------- 5 files changed, 1 insertion(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ca93a6a23a..4c9188f6a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -423,29 +423,6 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" -[[package]] -name = "env_filter" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - [[package]] name = "errno" version = "0.3.9" @@ -545,12 +522,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "iana-time-zone" version = "0.1.60" @@ -611,12 +582,10 @@ dependencies = [ "dirs", "dotenvy", "edit-distance", - "env_logger", "executable-path", "heck 0.5.0", "lexiclean", "libc", - "log", "num_cpus", "once_cell", "percent-encoding", diff --git a/Cargo.toml b/Cargo.toml index 09768ce917..5216c54190 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,11 +30,9 @@ derivative = "2.0.0" dirs = "5.0.1" dotenvy = "0.15" edit-distance = "2.0.0" -env_logger = "0.11.0" heck = "0.5.0" lexiclean = "0.0.1" libc = "0.2.0" -log = "0.4.4" num_cpus = "1.15.0" once_cell = "1.19.0" percent-encoding = "2.3.1" diff --git a/src/config.rs b/src/config.rs index e6f5bb1a68..bf8c58f67a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -750,10 +750,7 @@ impl Config { } pub(crate) fn run(self, loader: &Loader) -> RunResult { - if let Err(error) = InterruptHandler::install(self.verbosity) { - warn!("Failed to set CTRL-C handler: {error}"); - } - + InterruptHandler::install(self.verbosity).ok(); self.subcommand.execute(&self, loader) } } diff --git a/src/lib.rs b/src/lib.rs index d141b10a2b..75e3332be4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,6 @@ pub(crate) use { edit_distance::edit_distance, lexiclean::Lexiclean, libc::EXIT_FAILURE, - log::{info, warn}, once_cell::sync::Lazy, regex::Regex, serde::{ diff --git a/src/run.rs b/src/run.rs index a74511207c..d408dfba3e 100644 --- a/src/run.rs +++ b/src/run.rs @@ -6,17 +6,8 @@ pub fn run(args: impl Iterator + Clone>) -> Result<() #[cfg(windows)] ansi_term::enable_ansi_support().ok(); - env_logger::Builder::from_env( - env_logger::Env::new() - .filter("JUST_LOG") - .write_style("JUST_LOG_STYLE"), - ) - .try_init() - .ok(); - let app = Config::app(); - info!("Parsing command line arguments…"); let matches = app.try_get_matches_from(args).map_err(|err| { err.print().ok(); err.exit_code()