I want to use this pattern from the bevy cheatbook:
https://bevy-cheatbook.github.io/features/log.html#different-settings-for-debug-and-release-builds
use bevy::log::LogPlugin;
// this code is compiled only if debug assertions are enabled (debug mode)
#[cfg(debug_assertions)]
app.add_plugins(DefaultPlugins.set(LogPlugin {
level: bevy::log::Level::DEBUG,
filter: "debug,wgpu_core=warn,wgpu_hal=warn,mygame=debug".into(),
}));
// this code is compiled only if debug assertions are disabled (release mode)
#[cfg(not(debug_assertions))]
app.add_plugins(DefaultPlugins.set(LogPlugin {
level: bevy::log::Level::INFO,
filter: "info,wgpu_core=warn,wgpu_hal=warn".into(),
}));
It seems easier to add this after adding all of the other plugins, but will that break things? Do the DefaultPlugins need to be added first?