mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -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:
@@ -89,7 +89,7 @@ impl RotatingTriangle {
|
||||
let program = gl.create_program().expect("Cannot create program");
|
||||
|
||||
if !shader_version.is_new_shader_interface() {
|
||||
tracing::warn!(
|
||||
log::warn!(
|
||||
"Custom 3D painting hasn't been ported to {:?}",
|
||||
shader_version
|
||||
);
|
||||
|
||||
@@ -52,7 +52,7 @@ pub fn init_wasm_hooks() {
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
// Redirect tracing to console.log and friends:
|
||||
tracing_wasm::set_as_global_default();
|
||||
eframe::web::WebLogger::init(log::LevelFilter::Debug).ok();
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
|
||||
@@ -15,8 +15,8 @@ fn main() -> Result<(), eframe::Error> {
|
||||
std::env::set_var("RUST_LOG", rust_log);
|
||||
}
|
||||
|
||||
// Log to stdout (if you run with `RUST_LOG=debug`).
|
||||
tracing_subscriber::fmt::init();
|
||||
// Log to stderr (if you run with `RUST_LOG=debug`).
|
||||
env_logger::init();
|
||||
|
||||
let options = eframe::NativeOptions {
|
||||
drag_and_drop_support: true,
|
||||
|
||||
Reference in New Issue
Block a user