mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
ohos: Add default log filter (#32760)
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This commit is contained in:
parent
496ce717c5
commit
b206a0f4a3
3 changed files with 19 additions and 0 deletions
|
@ -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!");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue