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

@ -36,7 +36,6 @@ pub fn init(
callbacks: Box<dyn HostTrait>,
) -> Result<Rc<RunningAppState>, &'static str> {
info!("Entered simpleservo init function");
crate::init_tracing();
crate::init_crypto();
let resource_dir = PathBuf::from(&options.resource_dir).join("servo");
resources::set(Box::new(ResourceReaderInstance::new(resource_dir)));
@ -61,6 +60,8 @@ pub fn init(
},
};
crate::init_tracing(servoshell_preferences.tracing_filter.as_deref());
// Initialize surfman
let connection = Connection::new().or(Err("Failed to create connection"))?;
let adapter = connection