Skip to content

Commit 487f78f

Browse files
Update migration guide for logging changes (#1372)
Co-authored-by: Charles Bournhonesque <cbournhonesque@snapchat.com>
1 parent 82ef971 commit 487f78f

File tree

3 files changed

+28
-15
lines changed

3 files changed

+28
-15
lines changed

release-content/0.14/migration-guides/12045_Add_access_to_App_within_LogPluginupdate_subscriber.md

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
The `LogPlugin`’s `update_subscriber` field has been replaced with `custom_layer`
1+
The `LogPlugin`’s `update_subscriber` field has been replaced with the more flexible `custom_layer`.
2+
3+
```rust
4+
// in 0.13
5+
fn update_subscriber(_: &mut App, subscriber: BoxedSubscriber) -> BoxedSubscriber {
6+
Box::new(subscriber.with(CustomLayer))
7+
}
8+
9+
LogPlugin {
10+
update_subscriber: Some(update_subscriber),
11+
..default()
12+
}
13+
14+
// in 0.14
15+
fn custom_layer(_app: &mut App) -> Option<BoxedLayer> {
16+
// You can provide multiple layers like this, since Vec<Layer> is also a layer:
17+
Some(Box::new(vec![
18+
bevy::log::tracing_subscriber::fmt::layer()
19+
.with_file(true)
20+
.boxed(),
21+
CustomLayer.boxed(),
22+
]))
23+
}
24+
LogPlugin {
25+
custom_layer,
26+
..default()
27+
}
28+
```

release-content/0.14/migration-guides/_guides.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,6 @@ url = "https://github.com/bevyengine/bevy/pull/12164"
220220
areas = ["Diagnostics"]
221221
file_name = "12164_Make_sysinfo_diagnostic_plugin_optional.md"
222222

223-
[[guides]]
224-
title = "Add access to `App` within `LogPlugin::update_subscriber`"
225-
url = "https://github.com/bevyengine/bevy/pull/12045"
226-
areas = ["Diagnostics"]
227-
file_name = "12045_Add_access_to_App_within_LogPluginupdate_subscriber.md"
228-
229223
[[guides]]
230224
title = "Improve tracing layer customization"
231225
url = "https://github.com/bevyengine/bevy/pull/13159"

0 commit comments

Comments
 (0)