diff --git a/examples/androidvoip/jni/android_voip_client.cc b/examples/androidvoip/jni/android_voip_client.cc index 09234e46e1..684270255f 100644 --- a/examples/androidvoip/jni/android_voip_client.cc +++ b/examples/androidvoip/jni/android_voip_client.cc @@ -64,7 +64,7 @@ rtc::IPAddress QueryDefaultLocalAddress(int family) { std::unique_ptr socket( thread->socketserver()->CreateSocket(family, SOCK_DGRAM)); if (!socket) { - RTC_LOG_ERR(LERROR) << "Socket creation failed"; + RTC_LOG_ERR(LS_ERROR) << "Socket creation failed"; return rtc::IPAddress(); } @@ -308,7 +308,7 @@ void AndroidVoipClient::StartSession(JNIEnv* env) { rtp_socket_.reset(rtc::AsyncUDPSocket::Create(voip_thread_->socketserver(), rtp_local_address_)); if (!rtp_socket_) { - RTC_LOG_ERR(LERROR) << "Socket creation failed"; + RTC_LOG_ERR(LS_ERROR) << "Socket creation failed"; Java_VoipClient_onStartSessionCompleted(env_, j_voip_client_, /*isSuccessful=*/false); return; @@ -319,7 +319,7 @@ void AndroidVoipClient::StartSession(JNIEnv* env) { rtcp_socket_.reset(rtc::AsyncUDPSocket::Create(voip_thread_->socketserver(), rtcp_local_address_)); if (!rtcp_socket_) { - RTC_LOG_ERR(LERROR) << "Socket creation failed"; + RTC_LOG_ERR(LS_ERROR) << "Socket creation failed"; Java_VoipClient_onStartSessionCompleted(env_, j_voip_client_, /*isSuccessful=*/false); return; diff --git a/examples/unityplugin/simple_peer_connection.cc b/examples/unityplugin/simple_peer_connection.cc index 4e16c00bd4..0503a26ec2 100644 --- a/examples/unityplugin/simple_peer_connection.cc +++ b/examples/unityplugin/simple_peer_connection.cc @@ -269,7 +269,7 @@ void SimplePeerConnection::OnSuccess( } void SimplePeerConnection::OnFailure(webrtc::RTCError error) { - RTC_LOG(LERROR) << ToString(error.type()) << ": " << error.message(); + RTC_LOG(LS_ERROR) << ToString(error.type()) << ": " << error.message(); // TODO(hta): include error.type in the message if (OnFailureMessage) diff --git a/modules/audio_coding/acm2/acm_receiver.cc b/modules/audio_coding/acm2/acm_receiver.cc index 6d9211cd25..aa9816956e 100644 --- a/modules/audio_coding/acm2/acm_receiver.cc +++ b/modules/audio_coding/acm2/acm_receiver.cc @@ -66,14 +66,14 @@ AcmReceiver::~AcmReceiver() = default; int AcmReceiver::SetMinimumDelay(int delay_ms) { if (neteq_->SetMinimumDelay(delay_ms)) return 0; - RTC_LOG(LERROR) << "AcmReceiver::SetExtraDelay " << delay_ms; + RTC_LOG(LS_ERROR) << "AcmReceiver::SetExtraDelay " << delay_ms; return -1; } int AcmReceiver::SetMaximumDelay(int delay_ms) { if (neteq_->SetMaximumDelay(delay_ms)) return 0; - RTC_LOG(LERROR) << "AcmReceiver::SetExtraDelay " << delay_ms; + RTC_LOG(LS_ERROR) << "AcmReceiver::SetExtraDelay " << delay_ms; return -1; } @@ -134,9 +134,9 @@ int AcmReceiver::InsertPacket(const RTPHeader& rtp_header, } // `mutex_` is released. if (neteq_->InsertPacket(rtp_header, incoming_payload) < 0) { - RTC_LOG(LERROR) << "AcmReceiver::InsertPacket " - << static_cast(rtp_header.payloadType) - << " Failed to insert packet"; + RTC_LOG(LS_ERROR) << "AcmReceiver::InsertPacket " + << static_cast(rtp_header.payloadType) + << " Failed to insert packet"; return -1; } return 0; @@ -150,7 +150,7 @@ int AcmReceiver::GetAudio(int desired_freq_hz, int current_sample_rate_hz = 0; if (neteq_->GetAudio(audio_frame, muted, ¤t_sample_rate_hz) != NetEq::kOK) { - RTC_LOG(LERROR) << "AcmReceiver::GetAudio - NetEq Failed."; + RTC_LOG(LS_ERROR) << "AcmReceiver::GetAudio - NetEq Failed."; return -1; } @@ -170,8 +170,8 @@ int AcmReceiver::GetAudio(int desired_freq_hz, audio_frame->num_channels_, AudioFrame::kMaxDataSizeSamples, temp_output); if (samples_per_channel_int < 0) { - RTC_LOG(LERROR) << "AcmReceiver::GetAudio - " - "Resampling last_audio_buffer_ failed."; + RTC_LOG(LS_ERROR) << "AcmReceiver::GetAudio - " + "Resampling last_audio_buffer_ failed."; return -1; } } @@ -185,7 +185,7 @@ int AcmReceiver::GetAudio(int desired_freq_hz, audio_frame->num_channels_, AudioFrame::kMaxDataSizeSamples, audio_frame->mutable_data()); if (samples_per_channel_int < 0) { - RTC_LOG(LERROR) + RTC_LOG(LS_ERROR) << "AcmReceiver::GetAudio - Resampling audio_buffer_ failed."; return -1; } diff --git a/modules/audio_device/audio_device_impl.cc b/modules/audio_device/audio_device_impl.cc index 9d540f911c..200259a2f8 100644 --- a/modules/audio_device/audio_device_impl.cc +++ b/modules/audio_device/audio_device_impl.cc @@ -142,7 +142,7 @@ int32_t AudioDeviceModuleImpl::CheckPlatform() { RTC_LOG(LS_INFO) << "current platform is Mac"; #endif if (platform == kPlatformNotSupported) { - RTC_LOG(LERROR) + RTC_LOG(LS_ERROR) << "current platform is not supported => this module will self " "destruct!"; return -1; @@ -546,7 +546,7 @@ int32_t AudioDeviceModuleImpl::SetStereoRecording(bool enable) { RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); if (audio_device_->RecordingIsInitialized()) { - RTC_LOG(LERROR) + RTC_LOG(LS_ERROR) << "unable to set stereo mode after recording is initialized"; return -1; } @@ -592,7 +592,7 @@ int32_t AudioDeviceModuleImpl::SetStereoPlayout(bool enable) { RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); if (audio_device_->PlayoutIsInitialized()) { - RTC_LOG(LERROR) + RTC_LOG(LS_ERROR) << "unable to set stereo mode while playing side is initialized"; return -1; } @@ -856,7 +856,7 @@ int32_t AudioDeviceModuleImpl::PlayoutDelay(uint16_t* delayMS) const { CHECKinitialized_(); uint16_t delay = 0; if (audio_device_->PlayoutDelay(delay) == -1) { - RTC_LOG(LERROR) << "failed to retrieve the playout delay"; + RTC_LOG(LS_ERROR) << "failed to retrieve the playout delay"; return -1; } *delayMS = delay; diff --git a/p2p/base/stun_port.cc b/p2p/base/stun_port.cc index 1ebd15eaef..c9fbefdc16 100644 --- a/p2p/base/stun_port.cc +++ b/p2p/base/stun_port.cc @@ -577,7 +577,7 @@ void UDPPort::OnSendPacket(const void* data, size_t size, StunRequest* req) { options.info_signaled_after_sent.packet_type = rtc::PacketType::kStunMessage; CopyPortInformationToPacketInfo(&options.info_signaled_after_sent); if (socket_->SendTo(data, size, sreq->server_addr(), options) < 0) { - RTC_LOG_ERR_EX(LERROR, socket_->GetError()) + RTC_LOG_ERR_EX(LS_ERROR, socket_->GetError()) << "UDP send of " << size << " bytes to host " << sreq->server_addr().ToSensitiveString() << " (" << sreq->server_addr().ToResolvedSensitiveString() diff --git a/p2p/base/stun_request.cc b/p2p/base/stun_request.cc index b271daa6ba..09a7a8345e 100644 --- a/p2p/base/stun_request.cc +++ b/p2p/base/stun_request.cc @@ -147,9 +147,9 @@ bool StunRequestManager::CheckResponse(StunMessage* msg) { } else if (msg->type() == GetStunErrorResponseType(request->type())) { request->OnErrorResponse(msg); } else { - RTC_LOG(LERROR) << "Received response with wrong type: " << msg->type() - << " (expecting " - << GetStunSuccessResponseType(request->type()) << ")"; + RTC_LOG(LS_ERROR) << "Received response with wrong type: " << msg->type() + << " (expecting " + << GetStunSuccessResponseType(request->type()) << ")"; return false; } diff --git a/rtc_base/logging.h b/rtc_base/logging.h index b6fdf9c3a9..98729eff9c 100644 --- a/rtc_base/logging.h +++ b/rtc_base/logging.h @@ -94,8 +94,7 @@ enum LoggingSeverity { INFO [[deprecated("Use LS_INFO")]] = LS_INFO, // WARNING [[deprecated("Use LS_WARNING")]] = LS_WARNING, WARNING = LS_WARNING, - // LERROR [[deprecated("Use LS_ERROR")]] = LS_ERROR - LERROR = LS_ERROR + LERROR [[deprecated("Use LS_ERROR")]] = LS_ERROR }; // LogErrorContext assists in interpreting the meaning of an error value. diff --git a/rtc_base/network.cc b/rtc_base/network.cc index dbcdcc4c88..eefee969d2 100644 --- a/rtc_base/network.cc +++ b/rtc_base/network.cc @@ -652,8 +652,8 @@ bool BasicNetworkManager::CreateNetworks(bool include_ignored, struct ifaddrs* interfaces; int error = getifaddrs(&interfaces); if (error != 0) { - RTC_LOG_ERR(LERROR) << "getifaddrs failed to gather interface data: " - << error; + RTC_LOG_ERR(LS_ERROR) << "getifaddrs failed to gather interface data: " + << error; return false; } @@ -983,7 +983,7 @@ IPAddress BasicNetworkManager::QueryDefaultLocalAddress(int family) const { std::unique_ptr socket( socket_factory->CreateSocket(family, SOCK_DGRAM)); if (!socket) { - RTC_LOG_ERR(LERROR) << "Socket creation failed"; + RTC_LOG_ERR(LS_ERROR) << "Socket creation failed"; return IPAddress(); } diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc index 040904abd0..61acf54381 100644 --- a/rtc_base/physical_socket_server.cc +++ b/rtc_base/physical_socket_server.cc @@ -939,7 +939,7 @@ class Signaler : public Dispatcher { std::array afd = {-1, -1}; if (pipe(afd.data()) < 0) { - RTC_LOG(LERROR) << "pipe failed"; + RTC_LOG(LS_ERROR) << "pipe failed"; } return afd; }()), diff --git a/sdk/objc/native/src/audio/audio_device_module_ios.mm b/sdk/objc/native/src/audio/audio_device_module_ios.mm index db4ed21f9a..d0049c32ec 100644 --- a/sdk/objc/native/src/audio/audio_device_module_ios.mm +++ b/sdk/objc/native/src/audio/audio_device_module_ios.mm @@ -324,8 +324,7 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing) RTC_DLOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); if (audio_device_->PlayoutIsInitialized()) { - RTC_LOG(LERROR) - << "unable to set stereo mode while playing side is initialized"; + RTC_LOG(LS_ERROR) << "unable to set stereo mode while playing side is initialized"; return -1; } if (audio_device_->SetStereoPlayout(enable)) { @@ -588,7 +587,7 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing) CHECKinitialized_(); uint16_t delay = 0; if (audio_device_->PlayoutDelay(delay) == -1) { - RTC_LOG(LERROR) << "failed to retrieve the playout delay"; + RTC_LOG(LS_ERROR) << "failed to retrieve the playout delay"; return -1; } *delayMS = delay;