web: Fixed missing logs when using `log`
This commit is contained in:
parent
d213bc6f7f
commit
b38dbadad6
|
@ -3500,6 +3500,7 @@ dependencies = [
|
|||
"serde-wasm-bindgen",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
"tracing-log",
|
||||
"tracing-subscriber",
|
||||
"tracing-wasm",
|
||||
"url",
|
||||
|
|
|
@ -31,6 +31,7 @@ generational-arena = "0.2.8"
|
|||
js-sys = "0.3.61"
|
||||
tracing = { version = "0.1.37", features = ["log"] }
|
||||
tracing-subscriber = { version = "0.3.16", default-features = false, features = ["registry"] }
|
||||
tracing-log = "0.1.3"
|
||||
tracing-wasm = "0.2.1"
|
||||
ruffle_render_canvas = { path = "../render/canvas", optional = true }
|
||||
ruffle_web_common = { path = "common" }
|
||||
|
|
|
@ -494,6 +494,12 @@ impl Ruffle {
|
|||
js_player: JavascriptPlayer,
|
||||
config: Config,
|
||||
) -> Result<Ruffle, Box<dyn Error>> {
|
||||
// Redirect Log to Tracing if it isn't already
|
||||
let _ = tracing_log::LogTracer::builder()
|
||||
// wgpu crates are extremely verbose
|
||||
.ignore_crate("wgpu_hal")
|
||||
.ignore_crate("wgpu_core")
|
||||
.init();
|
||||
let log_subscriber = Arc::new(
|
||||
Registry::default().with(WASMLayer::new(
|
||||
WASMLayerConfigBuilder::new()
|
||||
|
|
Loading…
Reference in New Issue