on master help sign in
use env var for integration test log level
commitcb0440be85338b2669a8341dee2861ea53da7ef7 authorSkyler Hawthorne <skyler@dead10ck.com> dateWed 27 Apr 2022, 00:42 (5 years ago) parent652cdda
2 files changed+8−1
.github/workflows/build.yml+3 helix-term/src/application.rs+5−1
.github/workflows/build.yml+3
@@ -38,6 +38,9 @@ jobs:
3838 test:
3939 name: Test Suite
4040 runs-on: ${{ matrix.os }}
41+ env:
42+ RUST_BACKTRACE: 1
43+ HELIX_LOG_LEVEL: info
4144 steps:
4245 - name: Checkout sources
4346 uses: actions/checkout@v3
helix-term/src/application.rs+5−1
@@ -61,6 +61,10 @@ pub struct Application {
6161
6262#[cfg(feature = "integration")]
6363fn setup_integration_logging() {
64+ let level = std::env::var("HELIX_LOG_LEVEL")
65+ .map(|lvl| lvl.parse().unwrap())
66+ .unwrap_or(log::LevelFilter::Info);
67+
6468 // Separate file config so we can include year, month and day in file logs
6569 let _ = fern::Dispatch::new()
6670 .format(|out, message, record| {
@@ -72,7 +76,7 @@ fn setup_integration_logging() {
7276 message
7377 ))
7478 })
75− .level(log::LevelFilter::Debug)
79+ .level(level)
7680 .chain(std::io::stdout())
7781 .apply();
7882}