1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 12:50:04 -04:00

Use tracing crate for logging (#1192)

* egui_web: use tracing crate
* egui_glow: use tracing crate
* Log at the debug level
* egui_demo_app: enable tracing to log to stdout
* Use tracing in egui-winit
* Add opt-in tracing support to egui
This commit is contained in:
Emil Ernerfeldt
2022-02-01 12:27:39 +01:00
committed by GitHub
parent 1f03f53dc0
commit c6ac1827f6
28 changed files with 194 additions and 107 deletions

View File

@@ -116,7 +116,10 @@ impl TextureAtlas {
if required_height > self.max_height() {
// This is a bad place to be - we need to start reusing space :/
eprintln!("epaint texture atlas overflowed!");
#[cfg(feature = "tracing")]
tracing::wan!("epaint texture atlas overflowed!");
self.cursor = (0, self.image.height() / 3); // Restart a bit down - the top of the atlas has too many important things in it
self.overflowed = true; // this will signal the user that we need to recreate the texture atlas next frame.
} else if resize_to_min_height(&mut self.image, required_height) {