ohos: Add default log filter (#32760)

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This commit is contained in:
Jonathan Schwender 2024-07-12 06:12:25 +02:00 committed by GitHub
parent 496ce717c5
commit b206a0f4a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View file

@ -325,6 +325,23 @@ fn initialize_logging_once() {
static ONCE: Once = Once::new();
ONCE.call_once(|| {
let mut builder = hilog::Builder::new();
let filters = [
"fonts",
"servo",
"servoshell",
"servoshell::egl:gl_glue",
// Show JS errors by default.
"script::dom::bindings::error",
// Show GL errors by default.
"canvas::webgl_thread",
"compositing::compositor",
"constellation::constellation",
];
let mut filter_builder = env_filter::Builder::new();
for &module in &filters {
filter_builder.filter_module(module, log::LevelFilter::Debug);
}
builder.filter_level(LevelFilter::Debug).init();
info!("Servo Register callback called!");