From 1e1853b876a5f8cdb61889066db50540573cd198 Mon Sep 17 00:00:00 2001 From: theotherphil Date: Mon, 26 May 2025 23:29:59 +0100 Subject: [PATCH] Add missing doc comments for log_diagnostics_plugin (#19261) # Objective Fill some of the missing docs from bevy_diagnostics. --- crates/bevy_diagnostic/src/log_diagnostics_plugin.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/bevy_diagnostic/src/log_diagnostics_plugin.rs b/crates/bevy_diagnostic/src/log_diagnostics_plugin.rs index 8b01d10402..d91c4235cc 100644 --- a/crates/bevy_diagnostic/src/log_diagnostics_plugin.rs +++ b/crates/bevy_diagnostic/src/log_diagnostics_plugin.rs @@ -15,8 +15,14 @@ use log::{debug, info}; /// /// When no diagnostics are provided, this plugin does nothing. pub struct LogDiagnosticsPlugin { + /// If `true` then the `Debug` representation of each `Diagnostic` is logged. + /// If `false` then a (smoothed) current value and historical average are logged. + /// + /// Defaults to `false`. pub debug: bool, + /// Time to wait between logging diagnostics and logging them again. pub wait_duration: Duration, + /// If `Some` then only these diagnostics are logged. pub filter: Option>, } @@ -107,6 +113,7 @@ impl Plugin for LogDiagnosticsPlugin { } impl LogDiagnosticsPlugin { + /// Filter logging to only the paths in `filter`. pub fn filtered(filter: HashSet) -> Self { LogDiagnosticsPlugin { filter: Some(filter),