• Wez's avatar
    Revert "Reland "[Logging] Disable always-log-ERRORs-to-stderr unless LOG_TO_FILE is set."" · fd5efb2c
    Wez authored
    This reverts commit eb26f201.
    
    Reason for revert: This was relanded without any changes to address the
    LOG(ERROR) debugging issues that prompted it to be reverted the first time.
    
    Original change's description:
    > Reland "[Logging] Disable always-log-ERRORs-to-stderr unless LOG_TO_FILE is set."
    > 
    > This reverts commit c6b8b53b.
    > 
    > Reason for revert: Fixing the debugging issues.
    > 
    > Original change's description:
    > > Revert "[Logging] Disable always-log-ERRORs-to-stderr unless LOG_TO_FILE is set."
    > > 
    > > This reverts commit ffa05b99.
    > > 
    > > Reason for revert: This breaks a lot of debugging workflows.
    > > 
    > > Original change's description:
    > > > [Logging] Disable always-log-ERRORs-to-stderr unless LOG_TO_FILE is set.
    > > > 
    > > > logging::LogMessage has a special-case to write LOG_ERROR messages
    > > > to stderr, even if LOG_TO_STDERR is not enabled, to make ERROR and
    > > > FATAL messages more visible, especially in tests.
    > > > 
    > > > Restrict this behaviour to apply only if LOG_TO_FILE is set, so that
    > > > binaries which only LOG_TO_SYSTEM_DEBUG_LOG will never emit logspam
    > > > to stderr.
    > > > 
    > > > Tested by adding a unit test for this case.
    > > > 
    > > > Bug: 968387
    > > > Change-Id: Icfe094e7d7bf9697a70a589eab48edbe79c36091
    > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638782
    > > > Commit-Queue: Sharon Yang <yangsharon@chromium.org>
    > > > Reviewed-by: Wez <wez@chromium.org>
    > > > Cr-Commit-Position: refs/heads/master@{#666507}
    > > 
    > > TBR=wez@chromium.org,kmarshall@chromium.org,yangsharon@chromium.org
    > > 
    > > Change-Id: I857fd9bc95afedf204a5e981e6a362cd8990b4a8
    > > No-Presubmit: true
    > > No-Tree-Checks: true
    > > No-Try: true
    > > Bug: 968387
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647361
    > > Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    > > Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#666753}
    > 
    > TBR=dcheng@chromium.org,wez@chromium.org,kmarshall@chromium.org,yangsharon@chromium.org
    > 
    > # Not skipping CQ checks because original CL landed > 1 day ago.
    > 
    > Bug: 968387
    > Change-Id: Id656bff53e3b53e4df981ca8e819f33900c966f4
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1682954
    > Reviewed-by: Will Harris <wfh@chromium.org>
    > Commit-Queue: Aidan Wolter <awolter@chromium.org>
    > Auto-Submit: Aidan Wolter <awolter@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#677030}
    
    TBR=wez@chromium.org,agl@chromium.org,wfh@chromium.org,awolter@chromium.org,yangsharon@chromium.org
    
    # Not skipping CQ checks because original CL landed > 1 day ago.
    
    Bug: 968387, 984379
    Change-Id: I46779692208bef6db0fb442df22868fdeecf932e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1704681Reviewed-by: default avatarWez <wez@chromium.org>
    Reviewed-by: default avatarAdam Langley <agl@chromium.org>
    Commit-Queue: Wez <wez@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#677994}
    fd5efb2c
logging.cc 37.2 KB