Switch logging to system log, persistable prop.

Use system log for more durable log history.  Also accept persistable
version of flag to force adoptability.

Bug: 19993667
Change-Id: Icdf36799e26038e9a8e2bdaca276d97b22ba3941
This commit is contained in:
Jeff Sharkey 2015-04-18 16:15:10 -07:00
parent f1b996df6f
commit 5bad378015

View file

@ -52,7 +52,7 @@ using android::base::StringPrintf;
int main(int argc, char** argv) { int main(int argc, char** argv) {
setenv("ANDROID_LOG_TAGS", "*:v", 1); setenv("ANDROID_LOG_TAGS", "*:v", 1);
android::base::InitLogging(argv); android::base::InitLogging(argv, android::base::LogdLogger(android::base::SYSTEM));
LOG(INFO) << "Vold 3.0 (the awakening) firing up"; LOG(INFO) << "Vold 3.0 (the awakening) firing up";
@ -228,7 +228,9 @@ static int process_config(VolumeManager *vm) {
flags |= android::vold::Disk::Flags::kDefaultPrimary; flags |= android::vold::Disk::Flags::kDefaultPrimary;
} }
if (property_get_bool("vold.force_adoptable", false)) { if (property_get_bool("vold.force_adoptable", false)
|| property_get_bool("persist.vold.force_adoptable", false)) {
LOG(DEBUG) << "Forcing " << sysPattern << " to be adoptable";
flags |= android::vold::Disk::Flags::kAdoptable; flags |= android::vold::Disk::Flags::kAdoptable;
} }