Debian Codegraph @

.cargo/vendor/wasm-bindgen/guide/src/contributing/web-sys/logging.md

raw
1 # Logging
2
3 The `wasm_bindgen_webidl` crate (used by `web-sys`'s `build.rs`) uses
4 [`env_logger`][env_logger] for logging, which can be enabled by setting the
5 `RUST_LOG=wasm_bindgen_webidl` environment variable while building the `web-sys`
6 crate.
7
8 Make sure to enable "very verbose" output during `cargo build` to see these logs
9 within `web-sys`'s build script output.
10
11 ```sh
12 cd crates/web-sys
13 RUST_LOG=wasm_bindgen_webidl cargo build -vv
14 ```
15
16 If `wasm_bindgen_webidl` encounters WebIDL constructs that it doesn't know how
17 to translate into `wasm-bindgen` AST items, it will emit warn-level logs.
18
19 ```
20 WARN 2018-07-06T18:21:49Z: wasm_bindgen_webidl: Unsupported WebIDL interface: ...
21 ```
22
23 [env_logger]: https://crates.io/crates/env_logger