8000 Turn some warn logging to debug logging by emilk · Pull Request #47 · rerun-io/egui_tiles · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Turn some warn logging to debug logging #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/advanced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ fn tree_ui(

// Temporarily remove the tile to circumvent the borrowchecker
let Some(mut tile) = tiles.remove(tile_id) else {
log::warn!("Missing tile {tile_id:?}");
log::debug!("Missing tile {tile_id:?}");
return;
};

Expand Down
12 changes: 6 additions & 6 deletions src/tiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl<Pane> Tiles<Pane> {
} = insertion_point;

let Some(mut parent_tile) = self.tiles.remove(&parent_id) else {
log::warn!("Failed to insert: could not find parent {parent_id:?}");
log::debug!("Failed to insert: could not find parent {parent_id:?}");
return;
};

Expand Down Expand Up @@ -333,7 +333,7 @@ impl<Pane> Tiles<Pane> {
// This should only happen if the user set up the tree in a bad state,
// or if it was restored from a bad state via serde.
// …or if there is a bug somewhere 😜
log::warn!(
log::debug!(
"GC collecting tiles: {:?}",
self.tiles
.keys()
Expand Down Expand Up @@ -384,7 +384,7 @@ impl<Pane> Tiles<Pane> {
tile_id: TileId,
) {
let Some(mut tile) = self.tiles.remove(&tile_id) else {
log::warn!("Failed to find tile {tile_id:?} during layout");
log::debug!("Failed to find tile {tile_id:?} during layout");
return;
};
self.rects.insert(tile_id, rect);
Expand All @@ -410,7 +410,7 @@ impl<Pane> Tiles<Pane> {
parent_kind: Option<ContainerKind>,
) -> SimplifyAction {
let Some(mut tile) = self.tiles.remove(&it) else {
log::warn!("Failed to find tile {it:?} during simplify");
log::debug!("Failed to find tile {it:?} during simplify");
return SimplifyAction::Remove;
};

Expand Down Expand Up @@ -498,7 +498,7 @@ impl<Pane> Tiles<Pane> {

pub(super) fn make_all_panes_children_of_tabs(&mut self, parent_is_tabs: bool, it: TileId) {
let Some(mut tile) = self.tiles.remove(&it) else {
log::warn!("Failed to find tile {it:?} during make_all_panes_children_of_tabs");
log::debug!("Failed to find tile {it:?} during make_all_panes_children_of_tabs");
return;
};

Expand Down Expand Up @@ -531,7 +531,7 @@ impl<Pane> Tiles<Pane> {
should_activate: &mut dyn FnMut(TileId, &Tile<Pane>) -> bool,
) -> bool {
let Some(mut tile) = self.tiles.remove(&it) else {
log::warn!("Failed to find tile {it:?} during make_active");
log::debug!("Failed to find tile {it:?} during make_active");
return false;
};

Expand Down
4 changes: 2 additions & 2 deletions src/tree.rs
4639
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ impl<Pane> Tree<Pane> {
// NOTE: important that we get the rect and tile in two steps,
// otherwise we could loose the tile when there is no rect.
let Some(rect) = self.tiles.try_rect(tile_id) else {
log::warn!("Failed to find rect for tile {tile_id:?} during ui");
log::debug!("Failed to find rect for tile {tile_id:?} during ui");
return;
};
let Some(mut tile) = self.tiles.remove(tile_id) else {
log::warn!("Failed to find tile {tile_id:?} during ui");
log::debug!("Failed to find tile {tile_id:?} during ui");
return;
};

Expand Down
0