Deprecate <cutils/log.h> and <utils/Log.h>
This commit replaces <cutils/log.h> and <utils/Log.h> with <log/log.h>.
Background:
<cutils/log.h> has been moved to <log/log.h> for a while. Both
<cutils/log.h> and <utils/Log.h> simply includes <log/log.h> for
backward compatibility. This commit is a part of the effort to remove
<cutils/log.h> and <utils/Log.h> from the source tree eventually.
Bug: 78370064
Test: lunch aosp_walleye-userdebug && cd system/vold && mma
Change-Id: I1f9b7b132f9c35469e97556a30b521cc47e829d7
diff --git a/fs/Ext4.cpp b/fs/Ext4.cpp
index 89b8414..717c8b7 100644
--- a/fs/Ext4.cpp
+++ b/fs/Ext4.cpp
@@ -35,12 +35,9 @@
#include <linux/kdev_t.h>
-#define LOG_TAG "Vold"
-
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
-#include <cutils/log.h>
#include <cutils/properties.h>
#include <ext4_utils/ext4_crypt.h>
#include <logwrap/logwrap.h>
@@ -102,7 +99,8 @@
if (result == 0) {
break;
}
- ALOGW("%s(): umount(%s)=%d: %s\n", __func__, c_target, result, strerror(errno));
+ LOG(WARNING) << __func__ << "(): umount(" << c_target << ")=" << result << ": "
+ << strerror(errno);
sleep(1);
}
}
@@ -112,10 +110,10 @@
* (e.g. recent SDK system images). Detect these and skip the check.
*/
if (access(kFsckPath, X_OK)) {
- ALOGD("Not running %s on %s (executable not in system image)\n",
- kFsckPath, c_source);
+ LOG(DEBUG) << "Not running " << kFsckPath << " on " << c_source
+ << " (executable not in system image)";
} else {
- ALOGD("Running %s on %s\n", kFsckPath, c_source);
+ LOG(DEBUG) << "Running " << kFsckPath << " on " << c_source;
std::vector<std::string> cmd;
cmd.push_back(kFsckPath);