Revert "Consolidate loggability checks and replace streams."

This reverts commit 4092cd6db459ab8152588143b7b76e0946d2c433.

Reason for revert: Some g3 things depend on log macro implementation details.

Original change's description:
> Consolidate loggability checks and replace streams.
> 
> Currently we check if a message should be printed at the call site using LogMessage::Loggable, in the LogMessage itself using LogMessage::IsNoop and in LogMessage::OutputToDebug using log_to_stderr_.
> 
> This change unifies the first two of these into a early return in Log().
> 
> Bug: webrtc:8982
> Change-Id: Ia4e3e12b34716d76c05807e44db1ed4a62dffb87
> Reviewed-on: https://webrtc-review.googlesource.com/97440
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24547}

TBR=kwiberg@webrtc.org,jonasolsson@webrtc.org

Change-Id: I06f0a5b50c96c08a5e7be4d8d2bcb22d50c0179f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8982
Reviewed-on: https://webrtc-review.googlesource.com/97720
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24553}
This commit is contained in:
Jonas Olsson
2018-09-04 13:42:08 +00:00
committed by Commit Bot
parent 4c6747c9db
commit 46d65e2c2c
5 changed files with 101 additions and 46 deletions

View File

@ -146,10 +146,4 @@ std::string ToHex(const int i) {
return std::string(buffer);
}
std::string LeftPad(char padding, unsigned length, std::string s) {
if (s.length() >= length)
return s;
return std::string(length - s.length(), padding) + s;
}
} // namespace rtc