diff --git a/crates/bevy_log/src/lib.rs b/crates/bevy_log/src/lib.rs index 53f1dbd6d1..b3c1991769 100644 --- a/crates/bevy_log/src/lib.rs +++ b/crates/bevy_log/src/lib.rs @@ -133,6 +133,20 @@ pub(crate) struct FlushGuard(SyncCell); /// This plugin should not be added multiple times in the same process. This plugin /// sets up global logging configuration for **all** Apps in a given process, and /// rerunning the same initialization multiple times will lead to a panic. +/// +/// # Performance +/// +/// Filters applied through this plugin are computed at _runtime_, which will +/// have a non-zero impact on performance. +/// To achieve maximum performance, consider using +/// [_compile time_ filters](https://docs.rs/log/#compile-time-filters) +/// provided by the [`log`](https://crates.io/crates/log) crate. +/// +/// ```toml +/// # cargo.toml +/// [dependencies] +/// log = { version = "0.4", features = ["max_level_debug", "release_max_level_warn"] } +/// ``` pub struct LogPlugin { /// Filters logs using the [`EnvFilter`] format pub filter: String,