commit | 82ba0505eb7c6648b3ecadd61a02c3539dc826a6 | [log] [tgz] |
---|---|---|
author | Wez <[email protected]> | Wed May 11 08:50:08 2022 |
committer | Chromium LUCI CQ <[email protected]> | Wed May 11 08:50:08 2022 |
tree | 22ba3448d3bea1455efe5ef0b2f625110ac61ea1 | |
parent | cd78ab850a04a7ad8ea42299fcab7d4b2030cefd [diff] [blame] |
[logging] Clean up comment & Fuchsia-specific conditional logic Bug: 1250793 Change-Id: I375672900fa46837d96aa1c226c0a53ce08e58db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3637730 Auto-Submit: Wez <[email protected]> Reviewed-by: Greg Thompson <[email protected]> Commit-Queue: Wez <[email protected]> Reviewed-by: David Dorwin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1001972}
diff --git a/base/logging.cc b/base/logging.cc index 26f8e04..40b4bdaa 100644 --- a/base/logging.cc +++ b/base/logging.cc
@@ -501,12 +501,16 @@ bool ShouldLogToStderr(int severity) { if (g_logging_destination & LOG_TO_STDERR) return true; -#if !BUILDFLAG(IS_FUCHSIA) - // High-severity logs go to stderr by default, except on Fuchsia. + +#if BUILDFLAG(IS_FUCHSIA) + // Fuchsia will persist data logged to stdio by a component, so do not emit + // logs to stderr unless explicitly configured to do so. + return false; +#else if (severity >= kAlwaysPrintErrorLevel) return (g_logging_destination & ~LOG_TO_FILE) == LOG_NONE; -#endif return false; +#endif } int GetVlogVerbosity() {