mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Replace tracing with log (#2928)
* Replace tracing crate with log It's just so much simpler to use * Add `bacon wasm` job * eframe: add a WebLogger for piping log events to the web console
This commit is contained in:
@@ -8,6 +8,9 @@ mod input;
|
||||
pub mod screen_reader;
|
||||
pub mod storage;
|
||||
mod text_agent;
|
||||
mod web_logger;
|
||||
|
||||
pub use web_logger::WebLogger;
|
||||
|
||||
#[cfg(not(any(feature = "glow", feature = "wgpu")))]
|
||||
compile_error!("You must enable either the 'glow' or 'wgpu' feature");
|
||||
@@ -135,7 +138,7 @@ pub fn resize_canvas_to_screen_size(canvas_id: &str, max_size_points: egui::Vec2
|
||||
};
|
||||
|
||||
if width <= 0 || height <= 0 {
|
||||
tracing::error!("egui canvas parent size is {}x{}. Try adding `html, body {{ height: 100%; width: 100% }}` to your CSS!", width, height);
|
||||
log::error!("egui canvas parent size is {}x{}. Try adding `html, body {{ height: 100%; width: 100% }}` to your CSS!", width, height);
|
||||
}
|
||||
|
||||
let pixels_per_point = native_pixels_per_point();
|
||||
@@ -192,7 +195,7 @@ pub fn set_clipboard_text(s: &str) {
|
||||
let future = wasm_bindgen_futures::JsFuture::from(promise);
|
||||
let future = async move {
|
||||
if let Err(err) = future.await {
|
||||
tracing::error!("Copy/cut action denied: {:?}", err);
|
||||
log::error!("Copy/cut action denied: {:?}", err);
|
||||
}
|
||||
};
|
||||
wasm_bindgen_futures::spawn_local(future);
|
||||
|
||||
Reference in New Issue
Block a user