summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-04-27 04:42:18 +0000
committerSkyler Hawthorne2022-06-19 03:57:47 +0000
commitcb0440be85338b2669a8341dee2861ea53da7ef7 (patch)
treec940b296ed4918d810f1565e7097934b38b00d01
parent652cdda8338bee55eeff58066cd20e68bb0b5a44 (diff)
use env var for integration test log level
-rw-r--r--.github/workflows/build.yml3
-rw-r--r--helix-term/src/application.rs6
2 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d87d4a3b..50829caa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,6 +38,9 @@ jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}
+ env:
+ RUST_BACKTRACE: 1
+ HELIX_LOG_LEVEL: info
steps:
- name: Checkout sources
uses: actions/checkout@v3
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();
}