1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -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:
Emil Ernerfeldt
2023-04-18 21:11:26 +02:00
committed by GitHub
parent 0f9e1a3526
commit 9c9a54ce36
48 changed files with 477 additions and 291 deletions

View File

@@ -25,7 +25,7 @@ pub mod winit;
#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))]
pub use winit::*;
/// Check for OpenGL error and report it using `tracing::error`.
/// Check for OpenGL error and report it using `log::error`.
///
/// Only active in debug builds!
///
@@ -49,7 +49,7 @@ macro_rules! check_for_gl_error {
}};
}
/// Check for OpenGL error and report it using `tracing::error`.
/// Check for OpenGL error and report it using `log::error`.
///
/// WARNING: slow! Only use during setup!
///
@@ -90,7 +90,7 @@ pub fn check_for_gl_error_impl(gl: &glow::Context, file: &str, line: u32, contex
};
if context.is_empty() {
tracing::error!(
log::error!(
"GL error, at {}:{}: {} (0x{:X}). Please file a bug at https://github.com/emilk/egui/issues",
file,
line,
@@ -98,7 +98,7 @@ pub fn check_for_gl_error_impl(gl: &glow::Context, file: &str, line: u32, contex
error_code,
);
} else {
tracing::error!(
log::error!(
"GL error, at {}:{} ({}): {} (0x{:X}). Please file a bug at https://github.com/emilk/egui/issues",
file,
line,