Skip to content

Commit

Permalink
fix(browser-webrtc-example): use tracing-wasm logger
Browse files Browse the repository at this point in the history
Upgrade `wasm-logger` to `tracing-wasm`.

Related: #4950.

Pull-Request: #4952.
  • Loading branch information
DougAnderson444 authored Nov 29, 2023
1 parent ab9e7a0 commit bca3a26
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
13 changes: 12 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/browser-webrtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
axum = "0.6.19"
libp2p = { path = "../../libp2p", features = [ "ed25519", "macros", "ping", "wasm-bindgen", "tokio"] }
libp2p = { path = "../../libp2p", features = [ "ed25519", "macros", "ping", "tokio"] }
libp2p-webrtc = { workspace = true, features = ["tokio"] }
rust-embed = { version = "8.0.0", features = ["include-exclude", "interpolate-folder-path"] }
tokio = { version = "1.34", features = ["macros", "net", "rt", "signal"] }
Expand All @@ -37,9 +37,9 @@ mime_guess = "2.0.4"
js-sys = "0.3.66"
libp2p = { path = "../../libp2p", features = [ "ed25519", "macros", "ping", "wasm-bindgen"] }
libp2p-webrtc-websys = { workspace = true }
tracing-wasm = "0.2.1"
wasm-bindgen = "0.2.89"
wasm-bindgen-futures = "0.4.38"
wasm-logger = { version = "0.2.0" }
web-sys = { version = "0.3", features = ['Document', 'Element', 'HtmlElement', 'Node', 'Response', 'Window'] }

[lints]
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-webrtc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use web_sys::{Document, HtmlElement};

#[wasm_bindgen]
pub async fn run(libp2p_endpoint: String) -> Result<(), JsError> {
wasm_logger::init(wasm_logger::Config::default());
tracing_wasm::set_as_global_default();

let body = Body::from_current_window()?;
body.append_p("Let's ping the WebRTC Server!")?;
Expand Down

0 comments on commit bca3a26

Please sign in to comment.