[logging] Add LOG_TO_STDERR logging destination

* Separate LOG_TO_SYSTEM_DEBUG_LOG into two cases, LOG_TO_STDERR and
  LOG_TO_SYSTEM_DEBUG_LOG as before.
* Provide the option to only write to system specific logs, write to
  stderr or both, reducing redundant logs for systems which have log
  services, such as with Fuchsia.
* For all systems, logs with severity ERROR and above will continue to
  be written to stderr.
* All systems except Fuchsia have the same behaviour and defaults as
  before.
* Update default logging destination for Fuchsia to system logs only.


Bug: 960882
Change-Id: Ib0f27d194226ac5584609a3e8e4bc561828deed8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1601467
Commit-Queue: Sharon Yang <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#661446}
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 6b682efc..173b5041 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -146,7 +146,7 @@
     // Let --enable-logging=stderr force only stderr, particularly useful for
     // non-debug builds where otherwise you can't get logs to stderr at all.
     if (command_line.GetSwitchValueASCII(switches::kEnableLogging) == "stderr")
-      log_mode = LOG_TO_SYSTEM_DEBUG_LOG;
+      log_mode = LOG_TO_SYSTEM_DEBUG_LOG | LOG_TO_STDERR;
     else
       log_mode = kDefaultLoggingMode;
   } else {