[REFACTOR] Split Android and CrOS logging.
Previously, they are all cramped in main.cc. Split them
into their respective files logging.cc, logging_android.cc
and provide a common header, logging.h, that main.cc can use.
Bug: 147696014
Bug: 148818798
Test: builds
Test: build logging.cc in Android
Change-Id: Iafdaee6be20e204f4faa1d1d8f81e43670f08d96
diff --git a/common/utils.h b/common/utils.h
index 9dca9e8..c6c34f4 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -18,6 +18,7 @@
#define UPDATE_ENGINE_COMMON_UTILS_H_
#include <errno.h>
+#include <time.h>
#include <unistd.h>
#include <algorithm>
@@ -329,6 +330,9 @@
uint16_t* high_version,
uint16_t* low_version);
+// Return a string representation of |utime| for log file names.
+std::string GetTimeAsString(time_t utime);
+
} // namespace utils
// Utility class to close a file descriptor