Add missing doc comments for log_diagnostics_plugin (#19261)
# Objective Fill some of the missing docs from bevy_diagnostics.
This commit is contained in:
parent
0a11091ea8
commit
1e1853b876
@ -15,8 +15,14 @@ use log::{debug, info};
|
|||||||
///
|
///
|
||||||
/// When no diagnostics are provided, this plugin does nothing.
|
/// When no diagnostics are provided, this plugin does nothing.
|
||||||
pub struct LogDiagnosticsPlugin {
|
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,
|
pub debug: bool,
|
||||||
|
/// Time to wait between logging diagnostics and logging them again.
|
||||||
pub wait_duration: Duration,
|
pub wait_duration: Duration,
|
||||||
|
/// If `Some` then only these diagnostics are logged.
|
||||||
pub filter: Option<HashSet<DiagnosticPath>>,
|
pub filter: Option<HashSet<DiagnosticPath>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +113,7 @@ impl Plugin for LogDiagnosticsPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl LogDiagnosticsPlugin {
|
impl LogDiagnosticsPlugin {
|
||||||
|
/// Filter logging to only the paths in `filter`.
|
||||||
pub fn filtered(filter: HashSet<DiagnosticPath>) -> Self {
|
pub fn filtered(filter: HashSet<DiagnosticPath>) -> Self {
|
||||||
LogDiagnosticsPlugin {
|
LogDiagnosticsPlugin {
|
||||||
filter: Some(filter),
|
filter: Some(filter),
|
||||||
|
Loading…
Reference in New Issue
Block a user