on master help sign in
use env var for integration test log level
cb0440bSkyler Hawthorne
.github/workflows/build.yml+3
@@ -38,6 +38,9 @@ jobs:
38 test:
38 test:
39 name: Test Suite
39 name: Test Suite
40 runs-on: ${{ matrix.os }}
40 runs-on: ${{ matrix.os }}
41+ env:
42+ RUST_BACKTRACE: 1
43+ HELIX_LOG_LEVEL: info
41 steps:
44 steps:
42 - name: Checkout sources
45 - name: Checkout sources
43 uses: actions/checkout@v3
46 uses: actions/checkout@v3
helix-term/src/application.rs+5−1
@@ -61,6 +61,10 @@ pub struct Application {
61
61
62#[cfg(feature = "integration")]
62#[cfg(feature = "integration")]
63fn setup_integration_logging() {
63fn 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+
64 // Separate file config so we can include year, month and day in file logs
68 // Separate file config so we can include year, month and day in file logs
65 let _ = fern::Dispatch::new()
69 let _ = fern::Dispatch::new()
66 .format(|out, message, record| {
70 .format(|out, message, record| {
@@ -72,7 +76,7 @@ fn setup_integration_logging() {
72 message
76 message
73 ))
77 ))
74 })
78 })
75− .level(log::LevelFilter::Debug)
79+ .level(level)
76 .chain(std::io::stdout())
80 .chain(std::io::stdout())
77 .apply();
81 .apply();
78}
82}