sctp: Reduce logging level for common calls
Reduced the level so that the library can be run with INFO level without a lot of spam. VERBOSE is still reserved for frequent logs. Also, using WARNING for logs that are not fatal and which can easily be triggered by the user. Bug: webrtc:12614 Change-Id: If09c302b2b5bfc002471f86a8aeb74ba1172c705 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219465 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34054}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
3a45d32d4e
commit
402ceffff1
@ -237,7 +237,7 @@ bool DcSctpTransport::SendData(int sid,
|
|||||||
|
|
||||||
auto max_message_size = socket_->options().max_message_size;
|
auto max_message_size = socket_->options().max_message_size;
|
||||||
if (max_message_size > 0 && payload.size() > max_message_size) {
|
if (max_message_size > 0 && payload.size() > max_message_size) {
|
||||||
RTC_LOG(LS_ERROR) << debug_name_
|
RTC_LOG(LS_WARNING) << debug_name_
|
||||||
<< "->SendData(...): "
|
<< "->SendData(...): "
|
||||||
"Trying to send packet bigger "
|
"Trying to send packet bigger "
|
||||||
"than the max message size: "
|
"than the max message size: "
|
||||||
@ -348,7 +348,7 @@ void DcSctpTransport::SendPacket(rtc::ArrayView<const uint8_t> data) {
|
|||||||
data.size(), rtc::PacketOptions(), 0);
|
data.size(), rtc::PacketOptions(), 0);
|
||||||
|
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
RTC_LOG(LS_ERROR) << debug_name_ << "->SendPacket(length=" << data.size()
|
RTC_LOG(LS_WARNING) << debug_name_ << "->SendPacket(length=" << data.size()
|
||||||
<< ") failed with error: " << transport_->GetError()
|
<< ") failed with error: " << transport_->GetError()
|
||||||
<< ".";
|
<< ".";
|
||||||
}
|
}
|
||||||
@ -375,8 +375,8 @@ void DcSctpTransport::NotifyOutgoingMessageBufferEmpty() {
|
|||||||
|
|
||||||
void DcSctpTransport::OnMessageReceived(dcsctp::DcSctpMessage message) {
|
void DcSctpTransport::OnMessageReceived(dcsctp::DcSctpMessage message) {
|
||||||
RTC_DCHECK_RUN_ON(network_thread_);
|
RTC_DCHECK_RUN_ON(network_thread_);
|
||||||
RTC_LOG(LS_INFO) << debug_name_
|
RTC_LOG(LS_VERBOSE) << debug_name_ << "->OnMessageReceived(sid="
|
||||||
<< "->OnMessageReceived(sid=" << message.stream_id().value()
|
<< message.stream_id().value()
|
||||||
<< ", ppid=" << message.ppid().value()
|
<< ", ppid=" << message.ppid().value()
|
||||||
<< ", length=" << message.payload().size() << ").";
|
<< ", length=" << message.payload().size() << ").";
|
||||||
cricket::ReceiveDataParams receive_data_params;
|
cricket::ReceiveDataParams receive_data_params;
|
||||||
@ -435,7 +435,7 @@ void DcSctpTransport::OnStreamsResetFailed(
|
|||||||
absl::string_view reason) {
|
absl::string_view reason) {
|
||||||
// TODO(orphis): Need a test to check for correct behavior
|
// TODO(orphis): Need a test to check for correct behavior
|
||||||
for (auto& stream_id : outgoing_streams) {
|
for (auto& stream_id : outgoing_streams) {
|
||||||
RTC_LOG(LS_ERROR)
|
RTC_LOG(LS_WARNING)
|
||||||
<< debug_name_
|
<< debug_name_
|
||||||
<< "->OnStreamsResetFailed(...): Outgoing stream reset failed"
|
<< "->OnStreamsResetFailed(...): Outgoing stream reset failed"
|
||||||
<< ", sid=" << stream_id.value() << ", reason: " << reason << ".";
|
<< ", sid=" << stream_id.value() << ", reason: " << reason << ".";
|
||||||
@ -490,7 +490,8 @@ void DcSctpTransport::OnTransportWritableState(
|
|||||||
RTC_DCHECK_RUN_ON(network_thread_);
|
RTC_DCHECK_RUN_ON(network_thread_);
|
||||||
RTC_DCHECK_EQ(transport_, transport);
|
RTC_DCHECK_EQ(transport_, transport);
|
||||||
|
|
||||||
RTC_LOG(LS_INFO) << debug_name_ << "->OnTransportWritableState(), writable="
|
RTC_LOG(LS_VERBOSE) << debug_name_
|
||||||
|
<< "->OnTransportWritableState(), writable="
|
||||||
<< transport->writable();
|
<< transport->writable();
|
||||||
|
|
||||||
MaybeConnectSocket();
|
MaybeConnectSocket();
|
||||||
|
Reference in New Issue
Block a user