summaryrefslogtreecommitdiff
path: root/sideload_main.cc
diff options
context:
space:
mode:
authorAmin Hassani <ahassani@chromium.org>2020-09-16 11:19:28 -0700
committerAmin Hassani <ahassani@chromium.org>2020-09-17 10:17:36 -0700
commite53b39b8b9c5c0871841bbbb86f23657c0b7f91b (patch)
tree12746e5e7e4716ba7fc94d3ed5c1a36c4d47d474 /sideload_main.cc
parenta02a1f1dc837f22226499d9856a949fb180d099a (diff)
parent9956320ffa4edb340d20bd7f3c852a9e87437bd3 (diff)
update_engine: Merge remote-tracking branch 'cros/upstream' into cros/master
Done with: git merge cros/upstream --commit -s recursive - Added EC key support and its unittests. - Resolved a conlict on error codes. Since Android versions are not uploading any UMA metrics, I gave the priority to the Android version Since they can't be changed. - Changed the openssl functions to get1 version (from get0) version because of a current issue with gale. Once the issue is resolved we need to change them back. - Some remaining styling issues fixed by clang-format BUG=b:163153182 TEST=CQ passes TEST=unittests Change-Id: Ib95034422b92433ce26e28336bc4806b34910d38
Diffstat (limited to 'sideload_main.cc')
-rw-r--r--sideload_main.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/sideload_main.cc b/sideload_main.cc
index 818fa5c9..27967cda 100644
--- a/sideload_main.cc
+++ b/sideload_main.cc
@@ -20,7 +20,6 @@
#include <vector>
#include <base/command_line.h>
-#include <base/logging.h>
#include <base/strings/string_split.h>
#include <base/strings/stringprintf.h>
#include <brillo/asynchronous_signal_handler.h>
@@ -36,6 +35,7 @@
#include "update_engine/common/subprocess.h"
#include "update_engine/common/terminator.h"
#include "update_engine/common/utils.h"
+#include "update_engine/logging.h"
#include "update_engine/update_attempter_android.h"
using std::string;
@@ -46,17 +46,6 @@ using update_engine::UpdateStatus;
namespace chromeos_update_engine {
namespace {
-void SetupLogging() {
- string log_file;
- logging::LoggingSettings log_settings;
- log_settings.lock_log = logging::DONT_LOCK_LOG_FILE;
- log_settings.delete_old = logging::APPEND_TO_OLD_LOG_FILE;
- log_settings.log_file = nullptr;
- log_settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
-
- logging::InitLogging(log_settings);
-}
-
class SideloadDaemonState : public DaemonStateInterface,
public ServiceObserverInterface {
public:
@@ -195,7 +184,7 @@ int main(int argc, char** argv) {
DEFINE_int64(status_fd, -1, "A file descriptor to notify the update status.");
chromeos_update_engine::Terminator::Init();
- chromeos_update_engine::SetupLogging();
+ chromeos_update_engine::SetupLogging(true /* stderr */, false /* file */);
brillo::FlagHelper::Init(argc, argv, "Update Engine Sideload");
LOG(INFO) << "Update Engine Sideloading starting";