File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1717 env :
1818 ZERV_TEST_NATIVE_GIT : true
1919 ZERV_TEST_DOCKER : ${{ matrix.os == 'ubuntu-latest' && 'true' || 'false' }}
20+ FORCE_RUST_LOG_OFF : ${{ matrix.os == 'ubuntu-latest' && '1' || '' }}
2021 steps :
2122 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2223 with :
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ impl EnvVars {
1515 /// See [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html)
1616 pub const RUST_LOG : & ' static str = "RUST_LOG" ;
1717
18+ /// Force logging off for CI environments (Ubuntu CI).
19+ ///
20+ /// When set to any value, all logging is disabled regardless of RUST_LOG setting.
21+ /// Used specifically to prevent debug log spam in Ubuntu CI.
22+ pub const FORCE_RUST_LOG_OFF : & ' static str = "FORCE_RUST_LOG_OFF" ;
23+
1824 /// Use native Git instead of Docker Git for tests (default: false).
1925 ///
2026 /// Set to `true` or `1` to enable native Git in test environments.
Original file line number Diff line number Diff line change @@ -16,9 +16,11 @@ use crate::config::EnvVars;
1616/// 2. --verbose flag - enables debug level
1717/// 3. Default - error level only (Rust standard)
1818pub fn init_logging ( verbose : bool ) {
19- let filter = if let Ok ( _rust_log ) = std:: env:: var ( EnvVars :: RUST_LOG ) {
20- // EnvFilter::new(rust_log)
19+ let filter = if std:: env:: var ( EnvVars :: FORCE_RUST_LOG_OFF ) . is_ok ( ) {
20+ // Force logging off for CI environments
2121 EnvFilter :: new ( "off" )
22+ } else if let Ok ( rust_log) = std:: env:: var ( EnvVars :: RUST_LOG ) {
23+ EnvFilter :: new ( rust_log)
2224 } else if verbose {
2325 EnvFilter :: new ( "zerv=debug" )
2426 } else {
You can’t perform that action at this time.
0 commit comments