From e079c0bfc7c3e7de502622dfdd7173b6e96b4792 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 10 Sep 2024 17:51:27 +0200 Subject: [PATCH] Better debug logging in `request_discard` --- crates/egui/src/context.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 78338f2d8dc3..b365cff0e97b 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -1622,7 +1622,17 @@ impl Context { self.output_mut(|o| o.requested_discard = true); #[cfg(feature = "log")] - log::debug!("request_discard"); // TODO: trace level? + { + // TODO: trace level? + log::debug!( + "request_discard: {}", + if self.will_discard() { + "allowed" + } else { + "denied" + } + ); + } } /// Will the visual output of this frame be discarded?