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}
This commit is contained in:
@ -146,4 +146,10 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user