mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
[OH] allow setting log_filter
via prefs.json
(#36916)
This PR allows us to set the `log_filter` via `prefs.json` as well as commandline arguments. Priority goes commandline > prefs.json > compile-time default. Testing: I compiled and run servo on an OH device, and then checked the logs: ``` hdc hilog | tee log | rg 'Set log_filter to' ``` ``` 05-08 15:25:59.389 55824 55993 D A00000/org.servo.servo/servoshell::prefs: Set log_filter to: Some("debug,geometry=trace") ``` Signed-off-by: Astraea Quinn Skoutelli <astraea.quinn.skoutelli@huawei.com>
This commit is contained in:
parent
f58b0c6ad4
commit
8473946d11
2 changed files with 8 additions and 1 deletions
|
@ -236,6 +236,8 @@ pub struct Preferences {
|
|||
/// The user-agent to use for Servo. This can also be set via [`UserAgentPlatform`] in
|
||||
/// order to set the value to the default value for the given platform.
|
||||
pub user_agent: String,
|
||||
|
||||
pub log_filter: String,
|
||||
}
|
||||
|
||||
impl Preferences {
|
||||
|
@ -398,6 +400,7 @@ impl Preferences {
|
|||
threadpools_webrender_workers_max: 4,
|
||||
webgl_testing_context_creation_error: false,
|
||||
user_agent: String::new(),
|
||||
log_filter: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue