Change frequently run log statements in RtcEventLog to DLOG.

This substantially reduces the amount of text logged in release
builds when running:

rtc_unittests.exe --gtest_filter=*RtcEventLog*

Bug: none
Change-Id: I7b7c7e66fa467924e4414f1d9bfc1590ff01e0c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249981
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35859}
This commit is contained in:
Tommi 2022-01-31 16:54:54 +01:00 committed by WebRTC LUCI CQ
parent af2930a698
commit 4be7fbb81e
2 changed files with 9 additions and 10 deletions

View File

@ -39,10 +39,10 @@ std::unique_ptr<RtcEventLogEncoder> CreateEncoder(
RtcEventLog::EncodingType type) {
switch (type) {
case RtcEventLog::EncodingType::Legacy:
RTC_LOG(LS_INFO) << "Creating legacy encoder for RTC event log.";
RTC_DLOG(LS_INFO) << "Creating legacy encoder for RTC event log.";
return std::make_unique<RtcEventLogEncoderLegacy>();
case RtcEventLog::EncodingType::NewFormat:
RTC_LOG(LS_INFO) << "Creating new format encoder for RTC event log.";
RTC_DLOG(LS_INFO) << "Creating new format encoder for RTC event log.";
return std::make_unique<RtcEventLogEncoderNewFormat>();
default:
RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type)
@ -91,8 +91,7 @@ bool RtcEventLogImpl::StartLogging(std::unique_ptr<RtcEventLogOutput> output,
const int64_t timestamp_us = rtc::TimeMillis() * 1000;
const int64_t utc_time_us = rtc::TimeUTCMillis() * 1000;
RTC_LOG(LS_INFO) << "Starting WebRTC event log. (Timestamp, UTC) = "
"("
RTC_LOG(LS_INFO) << "Starting WebRTC event log. (Timestamp, UTC) = ("
<< timestamp_us << ", " << utc_time_us << ").";
RTC_DCHECK_RUN_ON(&logging_state_checker_);
@ -113,7 +112,7 @@ bool RtcEventLogImpl::StartLogging(std::unique_ptr<RtcEventLogOutput> output,
}
void RtcEventLogImpl::StopLogging() {
RTC_LOG(LS_INFO) << "Stopping WebRTC event log.";
RTC_DLOG(LS_INFO) << "Stopping WebRTC event log.";
// TODO(danilchap): Do not block current thread waiting on the task queue.
// It might work for now, for current callers, but disallows caller to share
// threads with the `task_queue_`.
@ -121,7 +120,7 @@ void RtcEventLogImpl::StopLogging() {
StopLogging([&output_stopped]() { output_stopped.Set(); });
output_stopped.Wait(rtc::Event::kForever);
RTC_LOG(LS_INFO) << "WebRTC event log successfully stopped.";
RTC_DLOG(LS_INFO) << "WebRTC event log successfully stopped.";
}
void RtcEventLogImpl::StopLogging(std::function<void()> callback) {

View File

@ -1664,13 +1664,13 @@ const RtpHeaderExtensionMap* ParsedRtcEventLog::GetRtpHeaderExtensionMap(
}
if (parse_unconfigured_header_extensions_ ==
UnconfiguredHeaderExtensions::kAttemptWebrtcDefaultConfig) {
RTC_LOG(LS_WARNING) << "Using default header extension map for SSRC "
<< ssrc;
RTC_DLOG(LS_WARNING) << "Using default header extension map for SSRC "
<< ssrc;
extensions_maps.insert(std::make_pair(ssrc, default_extension_map_));
return &default_extension_map_;
}
RTC_LOG(LS_WARNING) << "Not parsing header extensions for SSRC " << ssrc
<< ". No header extension map found.";
RTC_DLOG(LS_WARNING) << "Not parsing header extensions for SSRC " << ssrc
<< ". No header extension map found.";
return nullptr;
}