From cb0440be85338b2669a8341dee2861ea53da7ef7 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Wed, 27 Apr 2022 00:42:18 -0400 Subject: use env var for integration test log level --- helix-term/src/application.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'helix-term') diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 886b531b..f3aa955f 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -61,6 +61,10 @@ pub struct Application { #[cfg(feature = "integration")] fn setup_integration_logging() { + let level = std::env::var("HELIX_LOG_LEVEL") + .map(|lvl| lvl.parse().unwrap()) + .unwrap_or(log::LevelFilter::Info); + // Separate file config so we can include year, month and day in file logs let _ = fern::Dispatch::new() .format(|out, message, record| { @@ -72,7 +76,7 @@ fn setup_integration_logging() { message )) }) - .level(log::LevelFilter::Debug) + .level(level) .chain(std::io::stdout()) .apply(); } -- cgit v1.2.3-70-g09d2