From 98f979ae30e9881991e31f6ed5f6e5c3ad56ca58 Mon Sep 17 00:00:00 2001 From: Hayato Ito Date: Thu, 24 Oct 2024 22:12:46 +0900 Subject: [PATCH] Use env_logger --- Cargo.lock | 58 +++++++++++++++-------------------------------------- Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 18 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 35691b7..48773cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -209,17 +209,27 @@ 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.10.2" +version = "0.11.5" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -255,12 +265,6 @@ version = "0.5.0" source = "registry+/~https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "humantime" version = "2.1.0" @@ -300,17 +304,6 @@ dependencies = [ "hashbrown", ] -[[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", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -376,16 +369,6 @@ version = "1.19.0" source = "registry+/~https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "pretty_env_logger" -version = "0.5.0" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" -dependencies = [ - "env_logger", - "log", -] - [[package]] name = "proc-macro2" version = "1.0.86" @@ -523,10 +506,10 @@ dependencies = [ "anyhow", "chrono", "clap", + "env_logger", "glob", "log", "minijinja", - "pretty_env_logger", "pulldown-cmark", "rayon", "regex", @@ -553,15 +536,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "toml" version = "0.8.19" diff --git a/Cargo.toml b/Cargo.toml index 8b48563..6710d5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,10 @@ version = "0.8.0" [dependencies] anyhow = "1.0.86" clap = { version = "4", features = ["derive"] } +env_logger = "0.11.5" glob = "0.3.1" log = "0.4.22" minijinja = { version = "2.1.1", features = ["loader"] } -pretty_env_logger = "0.5.0" pulldown-cmark = "0.11.0" rayon = "1.10.0" regex = "1.10.5" diff --git a/src/main.rs b/src/main.rs index d55b57f..afa000c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,7 @@ enum Command { fn main() -> Result<()> { let opt = Cli::parse(); - pretty_env_logger::init(); + env_logger::init(); match opt.cmd { Command::Build { config,