vm run --log <logfile>
Just like run-app command, run supports --log flag to redirect the VM
log output.
Bug: 218934597
Test: vm run --log <logfile> ...
Change-Id: I077a6d22cfc10b4e537b73f8ed0cd7f838a81231
diff --git a/vm/src/main.rs b/vm/src/main.rs
index d215d7c..80ea9be 100644
--- a/vm/src/main.rs
+++ b/vm/src/main.rs
@@ -121,6 +121,10 @@
/// Path to file for VM console output.
#[structopt(long)]
console: Option<PathBuf>,
+
+ /// Path to file for VM log output.
+ #[structopt(long)]
+ log: Option<PathBuf>,
},
/// Stop a virtual machine running in the background
Stop {
@@ -213,12 +217,13 @@
cpu_affinity,
&extra_idsigs,
),
- Opt::Run { config, daemonize, cpus, cpu_affinity, console } => {
+ Opt::Run { config, daemonize, cpus, cpu_affinity, console, log } => {
command_run(
service,
&config,
daemonize,
console.as_deref(),
+ log.as_deref(),
/* mem */ None,
cpus,
cpu_affinity,