Skip to content

Commit f0343a2

Browse files
NickLarsenNZxarvic
authored andcommitted
Change into_span! to trace_span! to reduce noise (linebender#2203)
* change into_span! to trace_span! to reduce noise linebender#2202 * add to changelog and authors list
1 parent 72f8765 commit f0343a2

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ Laura Gallo
2121
Tim Murison
2222
Manmeet Singh
2323
Simon Fell
24+
Nick Larsen

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ You can find its changes [documented below](#070---2021-01-01).
9999
- `AppDelegate::window_added` now receives the new window's `WindowHandle`. ([#2119] by [@zedseven])
100100
- Removed line of code that prevented window miximalization. ([#2113] by [@Pavel-N])
101101
- Dont warn about unhandled `Notification`s which have `known_target` set to false ([#2141] by [@xarvic])
102-
- `ClipBox`, `Flex`, `List` and `Split` only call layout on children which need it ([#2145] by [@xarvic])
102+
- `ClipBox`, `Flex`, `List` and `Split` only call layout on children which need it ([#2145] by [@xarvic])
103103
- `SizedBox` now supports using `Key<f64>` for specifying size ([#2151] by [@GoldsteinE])
104104
- `RadioGroup` widgets are now constructed with new `row()`, `column()`, and `for_axis()` methods ([#2157] by [@twitchyliquid64])
105+
- Replace `info_span!` with `trace_span!` ([#2203] by [@NickLarsenNZ])
105106

106107
### Deprecated
107108

@@ -556,6 +557,7 @@ Last release without a changelog :(
556557
[@GoldsteinE]: https://github.com/GoldsteinE
557558
[@twitchyliquid64]: https://github.com/twitchyliquid64
558559
[@dristic]: https://github.com/dristic
560+
[@NickLarsenNZ]: https://github.com/NickLarsenNZ
559561

560562
[#599]: https://github.com/linebender/druid/pull/599
561563
[#611]: https://github.com/linebender/druid/pull/611
@@ -850,6 +852,7 @@ Last release without a changelog :(
850852
[#2158]: https://github.com/linebender/druid/pull/2158
851853
[#2172]: https://github.com/linebender/druid/pull/2172
852854
[#2196]: https://github.com/linebender/druid/pull/2196
855+
[#2203]: https://github.com/linebender/druid/pull/2203
853856

854857
[Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master
855858
[0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0

druid/src/core.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! The fundamental druid types.
1616
1717
use std::collections::VecDeque;
18-
use tracing::{info_span, trace, warn};
18+
use tracing::{trace, trace_span, warn};
1919

2020
use crate::bloom::Bloom;
2121
use crate::command::sys::{CLOSE_WINDOW, SUB_WINDOW_HOST_TO_PARENT, SUB_WINDOW_PARENT_TO_HOST};
@@ -412,7 +412,7 @@ impl<T, W: Widget<T>> WidgetPod<T, W> {
412412
widget_state: child_state,
413413
};
414414
// We add a span so that inner logs are marked as being in a lifecycle pass
415-
info_span!("lifecycle")
415+
trace_span!("lifecycle")
416416
.in_scope(|| child.lifecycle(&mut child_ctx, &hot_changed_event, data, env));
417417
// if hot changes and we're showing widget ids, always repaint
418418
if env.get(Env::DEBUG_WIDGET_ID) {
@@ -591,7 +591,7 @@ impl<T: Data, W: Widget<T>> WidgetPod<T, W> {
591591
let size_event = LifeCycle::Size(new_size);
592592

593593
// We add a span so that inner logs are marked as being in a lifecycle pass
594-
let _span = info_span!("lifecycle");
594+
let _span = trace_span!("lifecycle");
595595
let _span = _span.enter();
596596
self.inner.lifecycle(&mut child_ctx, &size_event, data, env);
597597
}

druid/src/window.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
use std::collections::{HashMap, VecDeque};
1818
use std::mem;
19-
use tracing::{error, info, info_span};
19+
use tracing::{error, info, trace_span};
2020

2121
// Automatically defaults to std::time::Instant on non Wasm platforms
2222
use instant::Instant;
@@ -285,7 +285,7 @@ impl<T: Data> Window<T> {
285285
};
286286

287287
{
288-
let _span = info_span!("event");
288+
let _span = trace_span!("event");
289289
let _span = _span.enter();
290290
self.root.event(&mut ctx, &event, data, env);
291291
}
@@ -350,7 +350,7 @@ impl<T: Data> Window<T> {
350350
};
351351

352352
{
353-
let _span = info_span!("lifecycle");
353+
let _span = trace_span!("lifecycle");
354354
let _span = _span.enter();
355355
self.root.lifecycle(&mut ctx, event, data, env);
356356
}
@@ -379,7 +379,7 @@ impl<T: Data> Window<T> {
379379
};
380380

381381
{
382-
let _span = info_span!("update");
382+
let _span = trace_span!("update");
383383
let _span = _span.enter();
384384
self.root.update(&mut update_ctx, data, env);
385385
}
@@ -475,7 +475,7 @@ impl<T: Data> Window<T> {
475475
};
476476

477477
let content_size = {
478-
let _span = info_span!("layout");
478+
let _span = trace_span!("layout");
479479
let _span = _span.enter();
480480
self.root.layout(&mut layout_ctx, &bc, data, env)
481481
};
@@ -534,7 +534,7 @@ impl<T: Data> Window<T> {
534534
};
535535

536536
let root = &mut self.root;
537-
info_span!("paint").in_scope(|| {
537+
trace_span!("paint").in_scope(|| {
538538
ctx.with_child_ctx(invalid.clone(), |ctx| root.paint_raw(ctx, data, env));
539539
});
540540

0 commit comments

Comments
 (0)