Improve logging.

Any output from the LOG family will now go to stderr and logcat on the
device. stderr is usually redirected to a log file, but that is now
inhibited for adbd if being run from a tty (useful when debugging with
the serial console).

This also fixes sending logs to the file on device for the trace mask
of "all". The "all" tag was specifically handled to return early from
the function, preventing the file initialization from happening.

Change-Id: Id253577bfd1500fbce92dbfba0f9be23dbfd5ee4
diff --git a/adb/daemon/main.cpp b/adb/daemon/main.cpp
index 99ff539..c0612cd 100644
--- a/adb/daemon/main.cpp
+++ b/adb/daemon/main.cpp
@@ -230,8 +230,6 @@
 }
 
 int main(int argc, char** argv) {
-    android::base::InitLogging(argv);
-
     while (true) {
         static struct option opts[] = {
             {"root_seclabel", required_argument, nullptr, 's'},
@@ -265,7 +263,7 @@
 
     close_stdin();
 
-    adb_trace_init();
+    adb_trace_init(argv);
 
     /* If adbd runs inside the emulator this will enable adb tracing via
      * adb-debug qemud service in the emulator. */