[OHOS] Allow setting the log-filter via cli arguments (#36444)

This PR allows setting the log-filter according to the env_filter spec
via CLI arguments.
Testing is currently in progress, will be done on machines running OHOS.

---------

Signed-off-by: Astraea Quinn Skoutelli <astraea.quinn.skoutelli@huawei.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Astraea Quinn S 2025-04-15 12:19:13 +02:00 committed by GitHub
parent 1ea80c4335
commit 064f82d0a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 75 additions and 29 deletions

View file

@ -97,6 +97,8 @@ pub fn init(
};
crate::init_tracing(servoshell_preferences.tracing_filter.as_deref());
#[cfg(target_env = "ohos")]
crate::egl::ohos::set_log_filter(servoshell_preferences.log_filter.as_deref());
let Ok(window_size) = (unsafe { super::get_xcomponent_size(xcomponent, native_window) }) else {
return Err("Failed to get xcomponent size");