Use android-base logging not cutils in secdiscard
Much nicer C++ style logging, but the main reason is to clean up
AutoCloseFD.h so I don't have to use cutils to use it.
Change-Id: I7a7f227508418046eecce6c89f813bd8854f448a
diff --git a/AutoCloseFD.h b/AutoCloseFD.h
index f9d7c86..9b68469 100644
--- a/AutoCloseFD.h
+++ b/AutoCloseFD.h
@@ -21,6 +21,8 @@
#include <fcntl.h>
#include <unistd.h>
+#include <android-base/logging.h>
+
// File descriptor which is automatically closed when this object is destroyed.
// Cannot be copied, since that would cause double-closes.
class AutoCloseFD {
@@ -33,7 +35,7 @@
if (fd != -1) {
int preserve_errno = errno;
if (close(fd) == -1) {
- SLOGE("close(2) failed: %s", strerror(errno));
+ PLOG(ERROR) << "close(2) failed";
};
errno = preserve_errno;
}