summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-05-29 06:22:16 +0000
committerGitHub <noreply@github.com>2020-05-29 06:22:16 +0000
commitf1bf481eb8eb79b82510fa2f26d983dc4d7067be (patch)
treebe785ccf7b2152197413a1e323e3035bc4b574d0
parent2b2b2bfd2a525001f2ce15d64392c930b6321ab2 (diff)
downloadalacritty-f1bf481eb8eb79b82510fa2f26d983dc4d7067be.tar.gz
alacritty-f1bf481eb8eb79b82510fa2f26d983dc4d7067be.zip
Remove env_logger depedency
The env logger has been broken for over a year and is not used by anyone as far as I know. This removes this option entirely in favor of Alacritty's built-in logger level selection flags.
-rw-r--r--CHANGELOG.md4
-rw-r--r--Cargo.lock1
-rw-r--r--alacritty/Cargo.toml1
-rw-r--r--alacritty/src/logging.rs16
4 files changed, 9 insertions, 13 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9078db18..0bf43110 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Minimum Rust version has been bumped to 1.41.0
- Prebuilt Linux binaries have been removed
+### Removed
+
+- Environment variable `RUST_LOG` for selecting the log level
+
### Added
- Default Command+N keybinding for SpawnNewInstance on macOS
diff --git a/Cargo.lock b/Cargo.lock
index 31a0dee9..000fd3e7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -21,7 +21,6 @@ dependencies = [
"clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"embed-resource 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"font 0.1.0",
"gl_generator 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml
index 5cd792ad..4033e581 100644
--- a/alacritty/Cargo.toml
+++ b/alacritty/Cargo.toml
@@ -13,7 +13,6 @@ alacritty_terminal = { path = "../alacritty_terminal", default-features = false
clap = "2"
log = "0.4"
time = "0.1.40"
-env_logger = "0.7.1"
fnv = "1"
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.8"
diff --git a/alacritty/src/logging.rs b/alacritty/src/logging.rs
index defa4605..0bc8db9c 100644
--- a/alacritty/src/logging.rs
+++ b/alacritty/src/logging.rs
@@ -42,17 +42,11 @@ pub fn initialize(
) -> Result<Option<PathBuf>, log::SetLoggerError> {
log::set_max_level(options.log_level);
- // Use env_logger if RUST_LOG environment variable is defined. Otherwise,
- // use the alacritty-only logger.
- if std::env::var("RUST_LOG").is_ok() {
- env_logger::try_init()?;
- Ok(None)
- } else {
- let logger = Logger::new(event_proxy);
- let path = logger.file_path();
- log::set_boxed_logger(Box::new(logger))?;
- Ok(path)
- }
+ let logger = Logger::new(event_proxy);
+ let path = logger.file_path();
+ log::set_boxed_logger(Box::new(logger))?;
+
+ Ok(path)
}
pub struct Logger {