Remove unnecessary logs
Some info-level logs are removed as they are not quite useful for
debugging. In addition, logs from the `disk` crate are suppressed to
reduce log spamming (they also are not useful for debugging) as below.
I crosvm : disk size 115,
I crosvm : Disk image file is hosted onf2f52010
I crosvm : disk size 20480,
I crosvm : Disk image file is hosted on file system type f2f52010
Bug: 251751405
Test: N/A
Change-Id: Ibae5681aee6880a8de38eede550ca8556392a24c
diff --git a/virtualizationservice/src/main.rs b/virtualizationservice/src/main.rs
index 327a45d..828d3a2 100644
--- a/virtualizationservice/src/main.rs
+++ b/virtualizationservice/src/main.rs
@@ -22,6 +22,7 @@
mod selinux;
use crate::aidl::{VirtualizationService, BINDER_SERVICE_IDENTIFIER, TEMPORARY_DIRECTORY};
+use android_logger::{Config, FilterBuilder};
use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualizationService::BnVirtualizationService;
use binder::{register_lazy_service, BinderFeatures, ProcessState};
use anyhow::Error;
@@ -41,10 +42,15 @@
fn main() {
android_logger::init_once(
- android_logger::Config::default()
+ Config::default()
.with_tag(LOG_TAG)
.with_min_level(Level::Info)
- .with_log_id(android_logger::LogId::System),
+ .with_log_id(android_logger::LogId::System)
+ .with_filter(
+ // Reduce logspam by silencing logs from the disk crate which don't provide much
+ // information to us.
+ FilterBuilder::new().parse("info,disk=off").build(),
+ ),
);
clear_temporary_files().expect("Failed to delete old temporary files");