Add support for logging absl::string_view.

Bug: webrtc:8982
Change-Id: I5691f91ea663756666cf187ee223ede50f87d5f0
Reviewed-on: https://webrtc-review.googlesource.com/99840
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24707}
This commit is contained in:
Jonas Olsson
2018-09-12 15:32:47 +02:00
committed by Commit Bot
parent 958ed23860
commit f2ce37cae5
4 changed files with 47 additions and 3 deletions

View File

@ -540,6 +540,9 @@ void Log(const LogArgType* fmt, ...) {
case LogArgType::kStdString:
log_message.stream() << *va_arg(args, const std::string*);
break;
case LogArgType::kStringView:
log_message.stream() << *va_arg(args, const absl::string_view*);
break;
case LogArgType::kVoidP:
log_message.stream() << rtc::ToHex(
reinterpret_cast<uintptr_t>(va_arg(args, const void*)));