mirror of
https://github.com/servo/servo.git
synced 2025-09-10 15:08:21 +01:00
UWP: include submodule logs
This commit is contained in:
parent
e1103176e3
commit
5ca122a938
2 changed files with 20 additions and 22 deletions
|
@ -18,9 +18,11 @@ pub struct VSLogger;
|
|||
impl log::Log for VSLogger {
|
||||
fn enabled(&self, metadata: &Metadata) -> bool {
|
||||
let modules = LOG_MODULE_FILTERS.lock().unwrap();
|
||||
let is_module_enabled =
|
||||
modules.contains(&String::from(metadata.target())) || modules.is_empty();
|
||||
return is_module_enabled;
|
||||
modules.is_empty() ||
|
||||
modules.iter().any(|module| {
|
||||
metadata.target() == module ||
|
||||
metadata.target().starts_with(&format!("{}::", module))
|
||||
})
|
||||
}
|
||||
|
||||
fn log(&self, record: &Record) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue