From 977b26570247a4fb0f95167924e04ddb988ec0c2 Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Thu, 12 Dec 2019 13:40:50 +0100 Subject: [PATCH] Reduce some logging at INFO level by moving log statements from LS_INFO to LS_VERBOSE. By default, unit tests run with logging at info level. A random run today produced more than 70.000 lines of output. This CL would reduce that by approximately 15.000. Bug: none Change-Id: Ie62708cebf109510a2443aa5ab5c4e645ffc6707 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161950 Commit-Queue: Harald Alvestrand Reviewed-by: Niels Moller Reviewed-by: Henrik Lundin Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#30077} --- call/call.cc | 11 +++++++++-- call/rtp_transport_controller_send.cc | 4 ++-- media/engine/webrtc_voice_engine.cc | 8 ++++---- modules/audio_processing/aec3/matched_filter.cc | 9 +++++---- pc/data_channel.cc | 2 +- pc/peer_connection.cc | 2 +- rtc_base/openssl_adapter.cc | 2 +- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/call/call.cc b/call/call.cc index 967836022a..e2d896249c 100644 --- a/call/call.cc +++ b/call/call.cc @@ -1044,8 +1044,15 @@ void Call::UpdateAggregateNetworkState() { ((have_video && video_network_state_ == kNetworkUp) || (have_audio && audio_network_state_ == kNetworkUp)); - RTC_LOG(LS_INFO) << "UpdateAggregateNetworkState: aggregate_state=" - << (aggregate_network_up ? "up" : "down"); + if (aggregate_network_up != aggregate_network_up_) { + RTC_LOG(LS_INFO) + << "UpdateAggregateNetworkState: aggregate_state change to " + << (aggregate_network_up ? "up" : "down"); + } else { + RTC_LOG(LS_VERBOSE) + << "UpdateAggregateNetworkState: aggregate_state remains at " + << (aggregate_network_up ? "up" : "down"); + } aggregate_network_up_ = aggregate_network_up; transport_send_ptr_->OnNetworkAvailability(aggregate_network_up); diff --git a/call/rtp_transport_controller_send.cc b/call/rtp_transport_controller_send.cc index 00a3e0b9e4..686dc379fd 100644 --- a/call/rtp_transport_controller_send.cc +++ b/call/rtp_transport_controller_send.cc @@ -302,8 +302,8 @@ void RtpTransportControllerSend::OnNetworkRouteChanged( } } void RtpTransportControllerSend::OnNetworkAvailability(bool network_available) { - RTC_LOG(LS_INFO) << "SignalNetworkState " - << (network_available ? "Up" : "Down"); + RTC_LOG(LS_VERBOSE) << "SignalNetworkState " + << (network_available ? "Up" : "Down"); NetworkAvailability msg; msg.at_time = Timestamp::ms(clock_->TimeInMilliseconds()); msg.network_available = network_available; diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index 21a9bc0448..bff31728e9 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc @@ -233,16 +233,16 @@ void WebRtcVoiceEngine::Init() { "rtc-low-prio", webrtc::TaskQueueFactory::Priority::LOW))); // Load our audio codec lists. - RTC_LOG(LS_INFO) << "Supported send codecs in order of preference:"; + RTC_LOG(LS_VERBOSE) << "Supported send codecs in order of preference:"; send_codecs_ = CollectCodecs(encoder_factory_->GetSupportedEncoders()); for (const AudioCodec& codec : send_codecs_) { - RTC_LOG(LS_INFO) << ToString(codec); + RTC_LOG(LS_VERBOSE) << ToString(codec); } - RTC_LOG(LS_INFO) << "Supported recv codecs in order of preference:"; + RTC_LOG(LS_VERBOSE) << "Supported recv codecs in order of preference:"; recv_codecs_ = CollectCodecs(decoder_factory_->GetSupportedDecoders()); for (const AudioCodec& codec : recv_codecs_) { - RTC_LOG(LS_INFO) << ToString(codec); + RTC_LOG(LS_VERBOSE) << ToString(codec); } #if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) diff --git a/modules/audio_processing/aec3/matched_filter.cc b/modules/audio_processing/aec3/matched_filter.cc index 5a62b7cf8a..2a489923b1 100644 --- a/modules/audio_processing/aec3/matched_filter.cc +++ b/modules/audio_processing/aec3/matched_filter.cc @@ -447,10 +447,11 @@ void MatchedFilter::LogFilterProperties(int sample_rate_hz, int start = static_cast(alignment_shift * downsampling_factor); int end = static_cast((alignment_shift + filters_[k].size()) * downsampling_factor); - RTC_LOG(LS_INFO) << "Filter " << k << ": start: " - << (start - static_cast(shift)) / kFsBy1000 - << " ms, end: " - << (end - static_cast(shift)) / kFsBy1000 << " ms."; + RTC_LOG(LS_VERBOSE) << "Filter " << k << ": start: " + << (start - static_cast(shift)) / kFsBy1000 + << " ms, end: " + << (end - static_cast(shift)) / kFsBy1000 + << " ms."; alignment_shift += filter_intra_lag_shift_; } } diff --git a/pc/data_channel.cc b/pc/data_channel.cc index cc470003d0..4f871b4d50 100644 --- a/pc/data_channel.cc +++ b/pc/data_channel.cc @@ -722,7 +722,7 @@ bool DataChannel::SendControlMessage(const rtc::CopyOnWriteBuffer& buffer) { cricket::SendDataResult send_result = cricket::SDR_SUCCESS; bool retval = provider_->SendData(send_params, buffer, &send_result); if (retval) { - RTC_LOG(LS_INFO) << "Sent CONTROL message on channel " << config_.id; + RTC_LOG(LS_VERBOSE) << "Sent CONTROL message on channel " << config_.id; if (handshake_state_ == kHandshakeShouldSendAck) { handshake_state_ = kHandshakeReady; diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index 0d43da4a51..96b2ce8503 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -5924,7 +5924,7 @@ cricket::ChannelInterface* PeerConnection::GetChannel( bool PeerConnection::GetSctpSslRole(rtc::SSLRole* role) { RTC_DCHECK_RUN_ON(signaling_thread()); if (!local_description() || !remote_description()) { - RTC_LOG(LS_INFO) + RTC_LOG(LS_VERBOSE) << "Local and Remote descriptions must be applied to get the " "SSL Role of the SCTP transport."; return false; diff --git a/rtc_base/openssl_adapter.cc b/rtc_base/openssl_adapter.cc index d0c1278144..0036aaeb25 100644 --- a/rtc_base/openssl_adapter.cc +++ b/rtc_base/openssl_adapter.cc @@ -780,7 +780,7 @@ void OpenSSLAdapter::SSLInfoCallback(const SSL* s, int where, int ret) { str = "SSL_accept"; } if (where & SSL_CB_LOOP) { - RTC_DLOG(LS_INFO) << str << ":" << SSL_state_string_long(s); + RTC_DLOG(LS_VERBOSE) << str << ":" << SSL_state_string_long(s); } else if (where & SSL_CB_ALERT) { str = (where & SSL_CB_READ) ? "read" : "write"; RTC_DLOG(LS_INFO) << "SSL3 alert " << str << ":"