Skip to content

Commit 937403e

Browse files
authored
Merge pull request #1186 from TheBlueMatt/2021-11-fix-log-select
Fix the `max_level_trace` feature
2 parents ef86a3e + 4831de4 commit 937403e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
build-no-std: true
4444
- toolchain: 1.36.0
4545
build-no-std: false
46+
test-log-variants: true
4647
- toolchain: 1.41.0
4748
build-no-std: false
4849
- toolchain: 1.45.2
@@ -73,6 +74,13 @@ jobs:
7374
cargo build --verbose --color always -p lightning
7475
cargo build --verbose --color always -p lightning-invoice
7576
cargo build --verbose --color always -p lightning-persister
77+
- name: Build on Rust ${{ matrix.toolchain }} with all Log-Limiting features
78+
if: matrix.test-log-variants
79+
run: |
80+
cd lightning
81+
for FEATURE in $(cat Cargo.toml | grep '^max_level_' | awk '{ print $1 }'); do
82+
cargo build --verbose --color always --features $FEATURE
83+
done
7684
- name: Build Block Sync Clients on Rust ${{ matrix.toolchain }} with features
7785
if: "matrix.build-net-tokio && !matrix.coverage"
7886
run: |

lightning/src/util/macro_logger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ macro_rules! log_given_level {
177177
#[cfg(not(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn", feature = "max_level_info", feature = "max_level_debug", feature = "max_level_trace")))]
178178
$crate::util::logger::Level::Gossip => log_internal!($logger, $lvl, $($arg)*),
179179

180-
#[cfg(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn", feature = "max_level_info", feature = "max_level_debug"))]
180+
#[cfg(any(feature = "max_level_off", feature = "max_level_error", feature = "max_level_warn", feature = "max_level_info", feature = "max_level_debug", feature = "max_level_trace"))]
181181
_ => {
182182
// The level is disabled at compile-time
183183
},

0 commit comments

Comments
 (0)