-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbasic.rs
More file actions
30 lines (27 loc) · 872 Bytes
/
basic.rs
File metadata and controls
30 lines (27 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//! A simple example showing how to setup the developer console plugin.
use bevy::log::LogPlugin;
use bevy::prelude::*;
use bevy_dev_console::prelude::*;
fn main() {
App::new()
.add_plugins((
// Add the log plugin with the custom log layer
DefaultPlugins.set(LogPlugin {
custom_layer: custom_log_layer,
// Add a filter to the log plugin that shows all log levels from this example
filter: format!("wgpu=error,naga=warn,{}=trace", module_path!()),
..default()
}),
// Add the dev console plugin itself.
DevConsolePlugin,
))
.add_systems(Startup, test)
.run();
}
fn test() {
trace!("tracing");
debug!("solving issues...");
info!("hello :)");
warn!("spooky warning");
error!("scary error");
}