Add cli option for tracing-filter (#35370)

Using environment variables is not really an option on ohos/android,
so add a CLI option to configure tracing.
Making it a `pref`, so that we can persist the filter
might also be desirable.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-02-08 08:10:12 +01:00 committed by GitHub
parent 39c1e5d5d6
commit 654df4c8b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 44 additions and 8 deletions

View file

@ -11,7 +11,6 @@ use crate::prefs::{parse_command_line_arguments, ArgumentParsingResult};
pub fn main() {
crate::crash_handler::install();
crate::init_tracing();
crate::init_crypto();
crate::resources::init();
@ -27,6 +26,8 @@ pub fn main() {
},
};
crate::init_tracing(servoshell_preferences.tracing_filter.as_deref());
let clean_shutdown = servoshell_preferences.clean_shutdown;
let event_loop = EventsLoop::new(servoshell_preferences.headless, opts.output_file.is_some())
.expect("Failed to create events loop");