Update vold to log only debug or higher level messages.
This will allow adding lots of verbose logs which can be enabled
only during local testing/debugging. Update the existing verbose
level logs to debug level since we want those to be logged by
default.
Test: manual
Change-Id: Ib05e2b6efa71308458d49affb6ed81d3975b28ab
diff --git a/Utils.cpp b/Utils.cpp
index f085c22..f202ef9 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -265,9 +265,9 @@
for (size_t i = 0; i < argc; i++) {
argv[i] = (char*)args[i].c_str();
if (i == 0) {
- LOG(VERBOSE) << args[i];
+ LOG(DEBUG) << args[i];
} else {
- LOG(VERBOSE) << " " << args[i];
+ LOG(DEBUG) << " " << args[i];
}
}
@@ -300,9 +300,9 @@
for (size_t i = 0; i < args.size(); i++) {
cmd += args[i] + " ";
if (i == 0) {
- LOG(VERBOSE) << args[i];
+ LOG(DEBUG) << args[i];
} else {
- LOG(VERBOSE) << " " << args[i];
+ LOG(DEBUG) << " " << args[i];
}
}
output.clear();
@@ -327,7 +327,7 @@
}
char line[1024];
while (fgets(line, sizeof(line), fp) != nullptr) {
- LOG(VERBOSE) << line;
+ LOG(DEBUG) << line;
output.push_back(std::string(line));
}
if (pclose(fp) != 0) {
@@ -344,9 +344,9 @@
for (size_t i = 0; i < argc; i++) {
argv[i] = (char*)args[i].c_str();
if (i == 0) {
- LOG(VERBOSE) << args[i];
+ LOG(DEBUG) << args[i];
} else {
- LOG(VERBOSE) << " " << args[i];
+ LOG(DEBUG) << " " << args[i];
}
}
@@ -686,7 +686,7 @@
}
status_t RestoreconRecursive(const std::string& path) {
- LOG(VERBOSE) << "Starting restorecon of " << path;
+ LOG(DEBUG) << "Starting restorecon of " << path;
static constexpr const char* kRestoreconString = "selinux.restorecon_recursive";
@@ -695,7 +695,7 @@
android::base::WaitForProperty(kRestoreconString, path);
- LOG(VERBOSE) << "Finished restorecon of " << path;
+ LOG(DEBUG) << "Finished restorecon of " << path;
return OK;
}