From 3d1c96fbecf4c77f1abb0406fec42f8cd92a600d Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 18 Jul 2022 09:51:44 +0200 Subject: [PATCH] feat(bindings/crypto-js): Redirect errors to `console.error`. --- bindings/matrix-sdk-crypto-js/src/tracing.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/matrix-sdk-crypto-js/src/tracing.rs b/bindings/matrix-sdk-crypto-js/src/tracing.rs index cf1f98d63..98599dd36 100644 --- a/bindings/matrix-sdk-crypto-js/src/tracing.rs +++ b/bindings/matrix-sdk-crypto-js/src/tracing.rs @@ -155,8 +155,8 @@ mod inner { #[wasm_bindgen(js_namespace = console, js_name = "warn")] fn log_warn(message: String); - #[wasm_bindgen(js_namespace = console, js_name = "log")] - fn log(message: String); + #[wasm_bindgen(js_namespace = console, js_name = "error")] + fn log_error(message: String); } struct Layer { @@ -215,7 +215,7 @@ mod inner { Level::DEBUG => log_debug(message), Level::INFO => log_info(message), Level::WARN => log_warn(message), - Level::ERROR => log(message), + Level::ERROR => log_error(message), } } }