Skip to content

Commit

Permalink
change into_span! to trace_span! to reduce noise linebender#2202
Browse files Browse the repository at this point in the history
  • Loading branch information
NickLarsenNZ committed Jul 5, 2022
1 parent 2fbefde commit 855a28a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions druid/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -415,7 +415,7 @@ impl<T, W: Widget<T>> WidgetPod<T, W> {
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) {
Expand Down Expand Up @@ -594,7 +594,7 @@ impl<T: Data, W: Widget<T>> WidgetPod<T, W> {
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);
}
Expand Down
12 changes: 6 additions & 6 deletions druid/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -285,7 +285,7 @@ impl<T: Data> Window<T> {
};

{
let _span = info_span!("event");
let _span = trace_span!("event");
let _span = _span.enter();
self.root.event(&mut ctx, &event, data, env);
}
Expand Down Expand Up @@ -350,7 +350,7 @@ impl<T: Data> Window<T> {
};

{
let _span = info_span!("lifecycle");
let _span = trace_span!("lifecycle");
let _span = _span.enter();
self.root.lifecycle(&mut ctx, event, data, env);
}
Expand Down Expand Up @@ -379,7 +379,7 @@ impl<T: Data> Window<T> {
};

{
let _span = info_span!("update");
let _span = trace_span!("update");
let _span = _span.enter();
self.root.update(&mut update_ctx, data, env);
}
Expand Down Expand Up @@ -475,7 +475,7 @@ impl<T: Data> Window<T> {
};

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)
};
Expand Down Expand Up @@ -534,7 +534,7 @@ impl<T: Data> Window<T> {
};

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));
});

Expand Down

0 comments on commit 855a28a

Please sign in to comment.