Allow update_engine to log to both logd and filesystem
Add a new option "logtofile" which default to false.
1. If both "logtostderr" and "logtofile" present, write to system debug
and log file.
2. If only "logtostderr" presents, write to system debug.
3. Otherwise write to log file only.
This keep the old logging behavior for omaha.
Bug: 65568605
Test: apply an update on pixel2 and check the log.
Change-Id: Id998f626fe5ebefbf6f4dffc19aee1c552343ab6
diff --git a/update_engine.rc b/update_engine.rc
index b6a706a..0576045 100644
--- a/update_engine.rc
+++ b/update_engine.rc
@@ -1,4 +1,4 @@
-service update_engine /system/bin/update_engine --logtostderr --foreground
+service update_engine /system/bin/update_engine --logtostderr --logtofile --foreground
class late_start
user root
group root system wakelock inet cache