Use default logger in CompOS mode

Since commit a182c9302263114dcf5961e4f3850c21ff7824d5 we set the
logger explicitly.

But this interacts badly with Microdroid, where the logd logger
doesn't work (see commit 52bd81259b5a2663a7685fe9d9aea2d2a4aabd63).

So, skip setting the logger in CompOS mode, where we are running
inside a Microdroid VM.

Bug: 265153235
Test: composd_cmd --test-compile, observe odrefresh log messages
Change-Id: I7af1b27ffd6e7043fe281f7afe5f0d9294ea6578
diff --git a/odrefresh/odrefresh_main.cc b/odrefresh/odrefresh_main.cc
index e62bc41..98a75f3 100644
--- a/odrefresh/odrefresh_main.cc
+++ b/odrefresh/odrefresh_main.cc
@@ -257,16 +257,21 @@
   // by others and prevents system_server from loading generated artifacts.
   umask(S_IWGRP | S_IWOTH);
 
-  // Explicitly initialize logging (b/201042799).
-  android::base::InitLogging(argv, android::base::LogdLogger(android::base::SYSTEM));
-
   OdrConfig config(argv[0]);
   int n = InitializeConfig(argc, argv, &config);
+
+  // Explicitly initialize logging (b/201042799).
+  // But not in CompOS mode - logd doesn't exist in Microdroid (b/265153235).
+  if (!config.GetCompilationOsMode()) {
+    android::base::InitLogging(argv, android::base::LogdLogger(android::base::SYSTEM));
+  }
+
   argv += n;
   argc -= n;
   if (argc != 1) {
     ArgumentError("Expected 1 argument, but have %d.", argc);
   }
+
   GetSystemProperties(config.MutableSystemProperties());
 
   OdrMetrics metrics(config.GetArtifactDirectory());