diff --git a/AUTHORS b/AUTHORS index dfa6b9f233..d22772a73c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,3 +21,4 @@ Laura Gallo Tim Murison Manmeet Singh Simon Fell +Nick Larsen diff --git a/CHANGELOG.md b/CHANGELOG.md index 59bd732506..7949f6ce99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,9 +99,10 @@ You can find its changes [documented below](#070---2021-01-01). - `AppDelegate::window_added` now receives the new window's `WindowHandle`. ([#2119] by [@zedseven]) - Removed line of code that prevented window miximalization. ([#2113] by [@Pavel-N]) - Dont warn about unhandled `Notification`s which have `known_target` set to false ([#2141] by [@xarvic]) -- `ClipBox`, `Flex`, `List` and `Split` only call layout on children which need it ([#2145] by [@xarvic]) +- `ClipBox`, `Flex`, `List` and `Split` only call layout on children which need it ([#2145] by [@xarvic]) - `SizedBox` now supports using `Key` for specifying size ([#2151] by [@GoldsteinE]) - `RadioGroup` widgets are now constructed with new `row()`, `column()`, and `for_axis()` methods ([#2157] by [@twitchyliquid64]) +- Replace `info_span!` with `trace_span!` ([#2203] by [@NickLarsenNZ]) ### Deprecated @@ -556,6 +557,7 @@ Last release without a changelog :( [@GoldsteinE]: https://github.com/GoldsteinE [@twitchyliquid64]: https://github.com/twitchyliquid64 [@dristic]: https://github.com/dristic +[@NickLarsenNZ]: https://github.com/NickLarsenNZ [#599]: https://github.com/linebender/druid/pull/599 [#611]: https://github.com/linebender/druid/pull/611 @@ -850,6 +852,7 @@ Last release without a changelog :( [#2158]: https://github.com/linebender/druid/pull/2158 [#2172]: https://github.com/linebender/druid/pull/2172 [#2196]: https://github.com/linebender/druid/pull/2196 +[#2203]: https://github.com/linebender/druid/pull/2203 [Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master [0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0 diff --git a/druid/src/core.rs b/druid/src/core.rs index 96e00d7ae7..0f0664cc23 100644 --- a/druid/src/core.rs +++ b/druid/src/core.rs @@ -15,7 +15,7 @@ //! The fundamental druid types. use std::collections::VecDeque; -use tracing::{info_span, trace, warn}; +use tracing::{trace, trace_span, warn}; use crate::bloom::Bloom; use crate::command::sys::{CLOSE_WINDOW, SUB_WINDOW_HOST_TO_PARENT, SUB_WINDOW_PARENT_TO_HOST}; @@ -415,7 +415,7 @@ impl> WidgetPod { widget_state: child_state, }; // We add a span so that inner logs are marked as being in a lifecycle pass - info_span!("lifecycle") + trace_span!("lifecycle") .in_scope(|| child.lifecycle(&mut child_ctx, &hot_changed_event, data, env)); // if hot changes and we're showing widget ids, always repaint if env.get(Env::DEBUG_WIDGET_ID) { @@ -594,7 +594,7 @@ impl> WidgetPod { let size_event = LifeCycle::Size(new_size); // We add a span so that inner logs are marked as being in a lifecycle pass - let _span = info_span!("lifecycle"); + let _span = trace_span!("lifecycle"); let _span = _span.enter(); self.inner.lifecycle(&mut child_ctx, &size_event, data, env); } diff --git a/druid/src/window.rs b/druid/src/window.rs index d949c0eb41..0e61cda104 100644 --- a/druid/src/window.rs +++ b/druid/src/window.rs @@ -16,7 +16,7 @@ use std::collections::{HashMap, VecDeque}; use std::mem; -use tracing::{error, info, info_span}; +use tracing::{error, info, trace_span}; // Automatically defaults to std::time::Instant on non Wasm platforms use instant::Instant; @@ -285,7 +285,7 @@ impl Window { }; { - let _span = info_span!("event"); + let _span = trace_span!("event"); let _span = _span.enter(); self.root.event(&mut ctx, &event, data, env); } @@ -350,7 +350,7 @@ impl Window { }; { - let _span = info_span!("lifecycle"); + let _span = trace_span!("lifecycle"); let _span = _span.enter(); self.root.lifecycle(&mut ctx, event, data, env); } @@ -379,7 +379,7 @@ impl Window { }; { - let _span = info_span!("update"); + let _span = trace_span!("update"); let _span = _span.enter(); self.root.update(&mut update_ctx, data, env); } @@ -475,7 +475,7 @@ impl Window { }; let content_size = { - let _span = info_span!("layout"); + let _span = trace_span!("layout"); let _span = _span.enter(); self.root.layout(&mut layout_ctx, &bc, data, env) }; @@ -534,7 +534,7 @@ impl Window { }; let root = &mut self.root; - info_span!("paint").in_scope(|| { + trace_span!("paint").in_scope(|| { ctx.with_child_ctx(invalid.clone(), |ctx| root.paint_raw(ctx, data, env)); });