From 436dadfae691affb942bb89b358c0331f10f0feb Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 10 Mar 2025 23:38:45 +0100 Subject: [PATCH 1/2] ci: Check logging code Fixes: https://github.com/trussed-dev/trussed/issues/114 --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f058b63d899..9e4e796795e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,6 +81,11 @@ jobs: cargo check --package trussed-core --all-targets if: matrix.target == 'x86_64-unknown-linux-gnu' + - name: Check all targets with default features and logging + run: | + cargo check --all-targets --features log-all + if: matrix.target == 'x86_64-unknown-linux-gnu' + - name: Check all features and targets run: | cargo check --workspace --all-features --all-targets From 024e0eca5fb7dbd2457831f7c7bffe4341e08775 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 10 Mar 2025 23:43:31 +0100 Subject: [PATCH 2/2] Fix log message in Service::process --- src/service.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/service.rs b/src/service.rs index f959e8817d6..93889e13fca 100644 --- a/src/service.rs +++ b/src/service.rs @@ -856,6 +856,13 @@ impl Service { }; } } + + #[cfg(all( + any(feature = "log-debug", feature = "log-all"), + not(feature = "log-none") + ))] + use crate::store::Store as _; + debug_now!( "I/E/V : {}/{}/{} >", self.resources