You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whether log statements are visible depends on multiple conditions:
45
+
Whether log statements are visible depends on multiple conditions:
45
46
46
47
1. The compile-time max log level of the `log` crate. See [log compile-time filters].
47
48
Note: The `release_max_level_<level>` features of the log crate check if `debug_assertions = false` is set
48
-
to determine the release filters should apply or not.
49
+
to determine the release filters should apply or not.
49
50
2. The runtime `log` global filter per module filters set in servoshell. Since environment variables aren't an
50
51
option to customize the log level, `servoshell` has the `--log-filter` option on ohos targets, which allows
51
-
customizing the log filter of the `log` crate.
52
-
By default servoshell sets a log filter which hides log statements from many crates, so you likely will need to
52
+
customizing the log filter of the `log` crate.
53
+
By default servoshell sets a log filter which hides log statements from many crates, so you likely will need to
53
54
set a custom log-filter if you aren't seeing the logs from the crate you are debugging.
54
55
3. The `hilog` base log filter. `hdc shell hilog --base-level=<log_level>`. Can be combined with `--domain` and `--tag`
55
-
options to customize **which logs are saved**.
56
+
options to customize **which logs are saved**.
56
57
4. The `hilog` log filter when displaying logs: `hdc shell hilog --level=<level>`
57
58
58
59
Most of the time option 2 and/or 4 should be used, since they allow quick changes with recompiling.
@@ -61,19 +62,27 @@ Most of the time option 2 and/or 4 should be used, since they allow quick change
61
62
62
63
### Hilog domains
63
64
64
-
`hilog` allows setting a custom integer called "domain" (between 0 and 0xFFFF) when logging, which allows developers to easily filter logs using the domain.
65
-
For Rust code in servo logged via the `log` crate we set [`0xE0C3`] as the domain and for Spidermonkey C++ code we set [`0xE0C4`].
65
+
`hilog` allows setting a custom integer called "domain" (between 0 and 0xFFFF) when logging, which allows developers to easily filter logs using the domain.
66
+
For Rust code in servo logged via the `log` crate we set [`0xE0C3`] as the domain and for Spidermonkey C++ code we set [`0xE0C4`].
0 commit comments