Deprecate and remove usage for WARNING log level

Bug: webrtc:13362
Change-Id: Ida112158e4ac5f667e533a0ebfedb400c84df4d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239124
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35425}
diff --git a/examples/peerconnection/client/peer_connection_client.cc b/examples/peerconnection/client/peer_connection_client.cc
index e4d2df4..c0de4ff 100644
--- a/examples/peerconnection/client/peer_connection_client.cc
+++ b/examples/peerconnection/client/peer_connection_client.cc
@@ -77,7 +77,7 @@
   RTC_DCHECK(!client_name.empty());
 
   if (state_ != NOT_CONNECTED) {
-    RTC_LOG(WARNING)
+    RTC_LOG(LS_WARNING)
         << "The client must not be connected before you can call Connect()";
     callback_->OnServerConnectionFailure();
     return;
@@ -479,7 +479,7 @@
     }
   } else {
     if (socket == control_socket_.get()) {
-      RTC_LOG(WARNING) << "Connection refused; retrying in 2 seconds";
+      RTC_LOG(LS_WARNING) << "Connection refused; retrying in 2 seconds";
       rtc::Thread::Current()->PostDelayed(RTC_FROM_HERE, kReconnectDelay, this,
                                           0);
     } else {
diff --git a/examples/unityplugin/simple_peer_connection.cc b/examples/unityplugin/simple_peer_connection.cc
index 0503a26..8a82718 100644
--- a/examples/unityplugin/simple_peer_connection.cc
+++ b/examples/unityplugin/simple_peer_connection.cc
@@ -343,9 +343,9 @@
   webrtc::SessionDescriptionInterface* session_description(
       webrtc::CreateSessionDescription(desc_type, remote_desc, &error));
   if (!session_description) {
-    RTC_LOG(WARNING) << "Can't parse received session description message. "
-                        "SdpParseError was: "
-                     << error.description;
+    RTC_LOG(LS_WARNING) << "Can't parse received session description message. "
+                           "SdpParseError was: "
+                        << error.description;
     return false;
   }
   RTC_LOG(LS_INFO) << " Received session description :" << remote_desc;
@@ -365,13 +365,13 @@
   std::unique_ptr<webrtc::IceCandidateInterface> ice_candidate(
       webrtc::CreateIceCandidate(sdp_mid, sdp_mlineindex, candidate, &error));
   if (!ice_candidate.get()) {
-    RTC_LOG(WARNING) << "Can't parse received candidate message. "
-                        "SdpParseError was: "
-                     << error.description;
+    RTC_LOG(LS_WARNING) << "Can't parse received candidate message. "
+                           "SdpParseError was: "
+                        << error.description;
     return false;
   }
   if (!peer_connection_->AddIceCandidate(ice_candidate.get())) {
-    RTC_LOG(WARNING) << "Failed to apply the received candidate";
+    RTC_LOG(LS_WARNING) << "Failed to apply the received candidate";
     return false;
   }
   RTC_LOG(LS_INFO) << " Received candidate :" << candidate;
diff --git a/modules/audio_device/android/aaudio_player.cc b/modules/audio_device/android/aaudio_player.cc
index a5a3675..5257b2b 100644
--- a/modules/audio_device/android/aaudio_player.cc
+++ b/modules/audio_device/android/aaudio_player.cc
@@ -142,7 +142,7 @@
   if (aaudio_.stream_state() == AAUDIO_STREAM_STATE_DISCONNECTED) {
     // The stream is disconnected and any attempt to use it will return
     // AAUDIO_ERROR_DISCONNECTED.
-    RTC_LOG(WARNING) << "Output stream disconnected";
+    RTC_LOG(LS_WARNING) << "Output stream disconnected";
     // AAudio documentation states: "You should not close or reopen the stream
     // from the callback, use another thread instead". A message is therefore
     // sent to the main thread to do the restart operation.
diff --git a/modules/audio_device/android/aaudio_recorder.cc b/modules/audio_device/android/aaudio_recorder.cc
index d91fb9e..4757cf8 100644
--- a/modules/audio_device/android/aaudio_recorder.cc
+++ b/modules/audio_device/android/aaudio_recorder.cc
@@ -137,7 +137,7 @@
   if (aaudio_.stream_state() == AAUDIO_STREAM_STATE_DISCONNECTED) {
     // The stream is disconnected and any attempt to use it will return
     // AAUDIO_ERROR_DISCONNECTED..
-    RTC_LOG(WARNING) << "Input stream disconnected => restart is required";
+    RTC_LOG(LS_WARNING) << "Input stream disconnected => restart is required";
     // AAudio documentation states: "You should not close or reopen the stream
     // from the callback, use another thread instead". A message is therefore
     // sent to the main thread to do the restart operation.
diff --git a/modules/audio_device/android/aaudio_wrapper.cc b/modules/audio_device/android/aaudio_wrapper.cc
index 82860e3..3d824b5 100644
--- a/modules/audio_device/android/aaudio_wrapper.cc
+++ b/modules/audio_device/android/aaudio_wrapper.cc
@@ -91,8 +91,8 @@
                    aaudio_result_t error) {
   RTC_DCHECK(user_data);
   AAudioWrapper* aaudio_wrapper = reinterpret_cast<AAudioWrapper*>(user_data);
-  RTC_LOG(WARNING) << "ErrorCallback: "
-                   << DirectionToString(aaudio_wrapper->direction());
+  RTC_LOG(LS_WARNING) << "ErrorCallback: "
+                      << DirectionToString(aaudio_wrapper->direction());
   RTC_DCHECK(aaudio_wrapper->observer());
   aaudio_wrapper->observer()->OnErrorCallback(error);
 }
diff --git a/modules/audio_device/android/audio_device_template.h b/modules/audio_device/android/audio_device_template.h
index a1510d3..999c587 100644
--- a/modules/audio_device/android/audio_device_template.h
+++ b/modules/audio_device/android/audio_device_template.h
@@ -171,7 +171,7 @@
   int32_t StartPlayout() override {
     RTC_DLOG(LS_INFO) << __FUNCTION__;
     if (!audio_manager_->IsCommunicationModeEnabled()) {
-      RTC_LOG(WARNING)
+      RTC_LOG(LS_WARNING)
           << "The application should use MODE_IN_COMMUNICATION audio mode!";
     }
     return output_.StartPlayout();
@@ -194,7 +194,7 @@
   int32_t StartRecording() override {
     RTC_DLOG(LS_INFO) << __FUNCTION__;
     if (!audio_manager_->IsCommunicationModeEnabled()) {
-      RTC_LOG(WARNING)
+      RTC_LOG(LS_WARNING)
           << "The application should use MODE_IN_COMMUNICATION audio mode!";
     }
     return input_.StartRecording();
diff --git a/modules/audio_device/android/audio_manager.cc b/modules/audio_device/android/audio_manager.cc
index e75bd4d..0b55496 100644
--- a/modules/audio_device/android/audio_manager.cc
+++ b/modules/audio_device/android/audio_manager.cc
@@ -123,7 +123,8 @@
   // If one already has been created, return existing object instead of
   // creating a new.
   if (engine_object_.Get() != nullptr) {
-    RTC_LOG(WARNING) << "The OpenSL ES engine object has already been created";
+    RTC_LOG(LS_WARNING)
+        << "The OpenSL ES engine object has already been created";
     return engine_object_.Get();
   }
   // Create the engine object in thread safe mode.
diff --git a/modules/audio_device/audio_device_buffer.cc b/modules/audio_device/audio_device_buffer.cc
index 73a8210..d393a88 100644
--- a/modules/audio_device/audio_device_buffer.cc
+++ b/modules/audio_device/audio_device_buffer.cc
@@ -64,7 +64,7 @@
   RTC_LOG(LS_INFO) << "AudioDeviceBuffer::ctor";
 #ifdef AUDIO_DEVICE_PLAYS_SINUS_TONE
   phase_ = 0.0;
-  RTC_LOG(WARNING) << "AUDIO_DEVICE_PLAYS_SINUS_TONE is defined!";
+  RTC_LOG(LS_WARNING) << "AUDIO_DEVICE_PLAYS_SINUS_TONE is defined!";
 #endif
 }
 
diff --git a/modules/audio_device/audio_device_impl.cc b/modules/audio_device/audio_device_impl.cc
index 200259a..01a8a25 100644
--- a/modules/audio_device/audio_device_impl.cc
+++ b/modules/audio_device/audio_device_impl.cc
@@ -251,7 +251,7 @@
   // - kPlatformDefaultAudio => ALSA, and
   // - kLinuxAlsaAudio => ALSA, and
   // - kLinuxPulseAudio => Invalid selection.
-  RTC_LOG(WARNING) << "PulseAudio is disabled using build flag.";
+  RTC_LOG(LS_WARNING) << "PulseAudio is disabled using build flag.";
   if ((audio_layer == kLinuxAlsaAudio) ||
       (audio_layer == kPlatformDefaultAudio)) {
     audio_device_.reset(new AudioDeviceLinuxALSA());
@@ -271,7 +271,7 @@
     RTC_LOG(LS_INFO) << "Linux PulseAudio APIs will be utilized";
   } else if (audio_layer == kLinuxAlsaAudio) {
     audio_device_.reset(new AudioDeviceLinuxALSA());
-    RTC_LOG(WARNING) << "Linux ALSA APIs will be utilized.";
+    RTC_LOG(LS_WARNING) << "Linux ALSA APIs will be utilized.";
   }
 #endif  // #if !defined(WEBRTC_ENABLE_LINUX_PULSE)
 #endif  // #if defined(WEBRTC_LINUX)
@@ -552,7 +552,7 @@
   }
   if (audio_device_->SetStereoRecording(enable) == -1) {
     if (enable) {
-      RTC_LOG(WARNING) << "failed to enable stereo recording";
+      RTC_LOG(LS_WARNING) << "failed to enable stereo recording";
     }
     return -1;
   }
@@ -597,7 +597,7 @@
     return -1;
   }
   if (audio_device_->SetStereoPlayout(enable)) {
-    RTC_LOG(WARNING) << "stereo playout is not supported";
+    RTC_LOG(LS_WARNING) << "stereo playout is not supported";
     return -1;
   }
   int8_t nChannels(1);
diff --git a/modules/audio_device/win/core_audio_base_win.cc b/modules/audio_device/win/core_audio_base_win.cc
index 40645d5..f43c068 100644
--- a/modules/audio_device/win/core_audio_base_win.cc
+++ b/modules/audio_device/win/core_audio_base_win.cc
@@ -506,9 +506,9 @@
   RTC_DLOG(LS_INFO) << "preferred_frames_per_buffer: "
                     << preferred_frames_per_buffer;
   if (preferred_frames_per_buffer % params.frames_per_buffer()) {
-    RTC_LOG(WARNING) << "Buffer size of " << params.frames_per_buffer()
-                     << " is not an even divisor of "
-                     << preferred_frames_per_buffer;
+    RTC_LOG(LS_WARNING) << "Buffer size of " << params.frames_per_buffer()
+                        << " is not an even divisor of "
+                        << preferred_frames_per_buffer;
   }
 
   // Create an AudioSessionControl interface given the initialized client.
diff --git a/modules/audio_device/win/core_audio_input_win.cc b/modules/audio_device/win/core_audio_input_win.cc
index 6ad5f46..17790da 100644
--- a/modules/audio_device/win/core_audio_input_win.cc
+++ b/modules/audio_device/win/core_audio_input_win.cc
@@ -187,7 +187,7 @@
   // Release resources allocated in InitRecording() and then return if this
   // method is called without any active input audio.
   if (!Recording()) {
-    RTC_DLOG(WARNING) << "No input stream is active";
+    RTC_DLOG(LS_WARNING) << "No input stream is active";
     ReleaseCOMObjects();
     initialized_ = false;
     return 0;
@@ -387,7 +387,7 @@
   if (error == CoreAudioBase::ErrorType::kStreamDisconnected) {
     HandleStreamDisconnected();
   } else {
-    RTC_DLOG(WARNING) << "Unsupported error type";
+    RTC_DLOG(LS_WARNING) << "Unsupported error type";
   }
   return true;
 }
diff --git a/modules/audio_device/win/core_audio_output_win.cc b/modules/audio_device/win/core_audio_output_win.cc
index 7522922..c92fedf 100644
--- a/modules/audio_device/win/core_audio_output_win.cc
+++ b/modules/audio_device/win/core_audio_output_win.cc
@@ -188,7 +188,7 @@
   // Release resources allocated in InitPlayout() and then return if this
   // method is called without any active output audio.
   if (!Playing()) {
-    RTC_DLOG(WARNING) << "No output stream is active";
+    RTC_DLOG(LS_WARNING) << "No output stream is active";
     ReleaseCOMObjects();
     initialized_ = false;
     return 0;
@@ -273,7 +273,7 @@
   if (error == CoreAudioBase::ErrorType::kStreamDisconnected) {
     HandleStreamDisconnected();
   } else {
-    RTC_DLOG(WARNING) << "Unsupported error type";
+    RTC_DLOG(LS_WARNING) << "Unsupported error type";
   }
   return true;
 }
diff --git a/modules/audio_device/win/core_audio_utility_win.cc b/modules/audio_device/win/core_audio_utility_win.cc
index 976edc8..c5a3520 100644
--- a/modules/audio_device/win/core_audio_utility_win.cc
+++ b/modules/audio_device/win/core_audio_utility_win.cc
@@ -1020,7 +1020,7 @@
   // Log a warning for the rare case where `mix_format` only contains a
   // stand-alone WAVEFORMATEX structure but don't return.
   if (!wrapped_format.IsExtensible()) {
-    RTC_DLOG(WARNING)
+    RTC_DLOG(LS_WARNING)
         << "The returned format contains no extended information. "
            "The size is "
         << wrapped_format.size() << " bytes.";
diff --git a/modules/congestion_controller/goog_cc/trendline_estimator.cc b/modules/congestion_controller/goog_cc/trendline_estimator.cc
index 1008bad..7fdf66c 100644
--- a/modules/congestion_controller/goog_cc/trendline_estimator.cc
+++ b/modules/congestion_controller/goog_cc/trendline_estimator.cc
@@ -44,7 +44,7 @@
   if (parsed_values == 1) {
     if (window_size > 1)
       return window_size;
-    RTC_LOG(WARNING) << "Window size must be greater than 1.";
+    RTC_LOG(LS_WARNING) << "Window size must be greater than 1.";
   }
   RTC_LOG(LS_WARNING) << "Failed to parse parameters for BweWindowSizeInPackets"
                          " experiment from field trial string. Using default.";
diff --git a/modules/desktop_capture/win/screen_capturer_win_gdi.cc b/modules/desktop_capture/win/screen_capturer_win_gdi.cc
index 231754c..57b1f71 100644
--- a/modules/desktop_capture/win/screen_capturer_win_gdi.cc
+++ b/modules/desktop_capture/win/screen_capturer_win_gdi.cc
@@ -86,7 +86,7 @@
   PrepareCaptureResources();
 
   if (!CaptureImage()) {
-    RTC_LOG(WARNING) << "Failed to capture screen by GDI.";
+    RTC_LOG(LS_WARNING) << "Failed to capture screen by GDI.";
     callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
     return;
   }
diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc
index 408f208..a3da2b5 100644
--- a/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -53,9 +53,9 @@
       sscanf(experiment_string.c_str(), "Enabled-%lf", &backoff_factor);
   if (parsed_values == 1) {
     if (backoff_factor >= 1.0) {
-      RTC_LOG(WARNING) << "Back-off factor must be less than 1.";
+      RTC_LOG(LS_WARNING) << "Back-off factor must be less than 1.";
     } else if (backoff_factor <= 0.0) {
-      RTC_LOG(WARNING) << "Back-off factor must be greater than 0.";
+      RTC_LOG(LS_WARNING) << "Back-off factor must be greater than 0.";
     } else {
       return backoff_factor;
     }
diff --git a/modules/rtp_rtcp/source/video_rtp_depacketizer_av1.cc b/modules/rtp_rtcp/source/video_rtp_depacketizer_av1.cc
index af2ed0c..5c41b48 100644
--- a/modules/rtp_rtcp/source/video_rtp_depacketizer_av1.cc
+++ b/modules/rtp_rtcp/source/video_rtp_depacketizer_av1.cc
@@ -191,14 +191,15 @@
         reinterpret_cast<const char*>(rtp_payload.data()), rtp_payload.size());
     uint8_t aggregation_header;
     if (!payload.ReadUInt8(&aggregation_header)) {
-      RTC_DLOG(WARNING) << "Failed to find aggregation header in the packet.";
+      RTC_DLOG(LS_WARNING)
+          << "Failed to find aggregation header in the packet.";
       return {};
     }
     // Z-bit: 1 if the first OBU contained in the packet is a continuation of a
     // previous OBU.
     bool continues_obu = RtpStartsWithFragment(aggregation_header);
     if (continues_obu != expect_continues_obu) {
-      RTC_DLOG(WARNING) << "Unexpected Z-bit " << continues_obu;
+      RTC_DLOG(LS_WARNING) << "Unexpected Z-bit " << continues_obu;
       return {};
     }
     int num_expected_obus = RtpNumObus(aggregation_header);
@@ -206,7 +207,8 @@
       // rtp packet has just the aggregation header. That may be valid only when
       // there is exactly one fragment in the packet of size 0.
       if (num_expected_obus != 1) {
-        RTC_DLOG(WARNING) << "Invalid packet with just an aggregation header.";
+        RTC_DLOG(LS_WARNING)
+            << "Invalid packet with just an aggregation header.";
         return {};
       }
       if (!continues_obu) {
@@ -228,16 +230,16 @@
       bool has_fragment_size = (obu_index != num_expected_obus);
       if (has_fragment_size) {
         if (!payload.ReadUVarint(&fragment_size)) {
-          RTC_DLOG(WARNING) << "Failed to read fragment size for obu #"
-                            << obu_index << "/" << num_expected_obus;
+          RTC_DLOG(LS_WARNING) << "Failed to read fragment size for obu #"
+                               << obu_index << "/" << num_expected_obus;
           return {};
         }
         if (fragment_size > payload.Length()) {
           // Malformed input: written size is larger than remaining buffer.
-          RTC_DLOG(WARNING) << "Malformed fragment size " << fragment_size
-                            << " is larger than remaining size "
-                            << payload.Length() << " while reading obu #"
-                            << obu_index << "/" << num_expected_obus;
+          RTC_DLOG(LS_WARNING) << "Malformed fragment size " << fragment_size
+                               << " is larger than remaining size "
+                               << payload.Length() << " while reading obu #"
+                               << obu_index << "/" << num_expected_obus;
           return {};
         }
       } else {
@@ -254,7 +256,7 @@
     expect_continues_obu = RtpEndsWithFragment(aggregation_header);
   }
   if (expect_continues_obu) {
-    RTC_DLOG(WARNING) << "Last packet shouldn't have last obu fragmented.";
+    RTC_DLOG(LS_WARNING) << "Last packet shouldn't have last obu fragmented.";
     return {};
   }
   return obu_infos;
@@ -278,7 +280,7 @@
 // Returns false if obu found to be misformed.
 bool CalculateObuSizes(ObuInfo* obu_info) {
   if (obu_info->data.empty()) {
-    RTC_DLOG(WARNING) << "Invalid bitstream: empty obu provided.";
+    RTC_DLOG(LS_WARNING) << "Invalid bitstream: empty obu provided.";
     return false;
   }
   auto it = obu_info->data.begin();
@@ -305,7 +307,7 @@
     uint8_t leb128_byte;
     do {
       if (it == obu_info->data.end() || size_of_obu_size_bytes >= 8) {
-        RTC_DLOG(WARNING)
+        RTC_DLOG(LS_WARNING)
             << "Failed to read obu_size. obu_size field is too long: "
             << size_of_obu_size_bytes << " bytes processed.";
         return false;
@@ -321,8 +323,9 @@
         obu_info->data.size() - obu_info->prefix_size - size_of_obu_size_bytes;
     if (obu_size_bytes != obu_info->payload_size) {
       // obu_size was present in the bitstream and mismatches calculated size.
-      RTC_DLOG(WARNING) << "Mismatch in obu_size. signaled: " << obu_size_bytes
-                        << ", actual: " << obu_info->payload_size;
+      RTC_DLOG(LS_WARNING) << "Mismatch in obu_size. signaled: "
+                           << obu_size_bytes
+                           << ", actual: " << obu_info->payload_size;
       return false;
     }
   }
diff --git a/modules/video_coding/fec_controller_default.cc b/modules/video_coding/fec_controller_default.cc
index 88315a8..f204b01 100644
--- a/modules/video_coding/fec_controller_default.cc
+++ b/modules/video_coding/fec_controller_default.cc
@@ -70,8 +70,9 @@
                      << overhead_threshold;
     return overhead_threshold;
   } else if (overhead_threshold < 0 || overhead_threshold > 1) {
-    RTC_LOG(WARNING) << "ProtectionOverheadRateThreshold field trial is set to "
-                        "an invalid value, expecting a value between (0, 1].";
+    RTC_LOG(LS_WARNING)
+        << "ProtectionOverheadRateThreshold field trial is set to "
+           "an invalid value, expecting a value between (0, 1].";
   }
   // WebRTC-ProtectionOverheadRateThreshold field trial string is not found, use
   // the default value.
diff --git a/p2p/base/p2p_transport_channel.cc b/p2p/base/p2p_transport_channel.cc
index 655490b..f6a3858 100644
--- a/p2p/base/p2p_transport_channel.cc
+++ b/p2p/base/p2p_transport_channel.cc
@@ -1569,8 +1569,8 @@
     if (val < 0) {
       // Because this also occurs deferred, probably no point in reporting an
       // error
-      RTC_LOG(WARNING) << "SetOption(" << opt << ", " << value
-                       << ") failed: " << port->GetError();
+      RTC_LOG(LS_WARNING) << "SetOption(" << opt << ", " << value
+                          << ") failed: " << port->GetError();
     }
   }
   return 0;
diff --git a/p2p/base/pseudo_tcp.cc b/p2p/base/pseudo_tcp.cc
index f168227..eff86e8 100644
--- a/p2p/base/pseudo_tcp.cc
+++ b/p2p/base/pseudo_tcp.cc
@@ -355,7 +355,7 @@
 
 bool PseudoTcp::NotifyPacket(const char* buffer, size_t len) {
   if (len > MAX_PACKET) {
-    RTC_LOG_F(WARNING) << "packet too large";
+    RTC_LOG_F(LS_WARNING) << "packet too large";
     return false;
   }
   return parse(reinterpret_cast<const uint8_t*>(buffer), uint32_t(len));
@@ -1240,7 +1240,7 @@
     // Window scale factor.
     // http://www.ietf.org/rfc/rfc1323.txt
     if (len != 1) {
-      RTC_LOG_F(WARNING) << "Invalid window scale option received.";
+      RTC_LOG_F(LS_WARNING) << "Invalid window scale option received.";
       return;
     }
     applyWindowScaleOption(data[0]);
diff --git a/pc/ice_server_parsing.cc b/pc/ice_server_parsing.cc
index b70322e..88f77bf 100644
--- a/pc/ice_server_parsing.cc
+++ b/pc/ice_server_parsing.cc
@@ -211,19 +211,19 @@
   }
 
   if (hoststring.find('@') != std::string::npos) {
-    RTC_LOG(WARNING) << "Invalid url: " << uri_without_transport;
-    RTC_LOG(WARNING)
+    RTC_LOG(LS_WARNING) << "Invalid url: " << uri_without_transport;
+    RTC_LOG(LS_WARNING)
         << "Note that user-info@ in turn:-urls is long-deprecated.";
     return RTCErrorType::SYNTAX_ERROR;
   }
   std::string address;
   if (!ParseHostnameAndPortFromString(hoststring, &address, &port)) {
-    RTC_LOG(WARNING) << "Invalid hostname format: " << uri_without_transport;
+    RTC_LOG(LS_WARNING) << "Invalid hostname format: " << uri_without_transport;
     return RTCErrorType::SYNTAX_ERROR;
   }
 
   if (port <= 0 || port > 0xffff) {
-    RTC_LOG(WARNING) << "Invalid port: " << port;
+    RTC_LOG(LS_WARNING) << "Invalid port: " << port;
     return RTCErrorType::SYNTAX_ERROR;
   }
 
diff --git a/rtc_base/http_common.cc b/rtc_base/http_common.cc
index 1dd4a20..0d78322 100644
--- a/rtc_base/http_common.cc
+++ b/rtc_base/http_common.cc
@@ -373,7 +373,7 @@
     if (DsMakeSpn("HTTP", server.HostAsURIString().c_str(), nullptr,
                   server.port(),
                   0, &len, spn) != ERROR_SUCCESS) {
-      RTC_LOG_F(WARNING) << "(Negotiate) - DsMakeSpn failed";
+      RTC_LOG_F(LS_WARNING) << "(Negotiate) - DsMakeSpn failed";
       return HAR_IGNORE;
     }
 #else
@@ -413,8 +413,8 @@
     if (neg) {
       const size_t max_steps = 10;
       if (++neg->steps >= max_steps) {
-        RTC_LOG(WARNING) << "AsyncHttpsProxySocket::Authenticate(Negotiate) "
-                            "too many retries";
+        RTC_LOG(LS_WARNING) << "AsyncHttpsProxySocket::Authenticate(Negotiate) "
+                               "too many retries";
         return HAR_ERROR;
       }
       steps = neg->steps;
diff --git a/rtc_base/logging.h b/rtc_base/logging.h
index 98729ef..3ac12d7 100644
--- a/rtc_base/logging.h
+++ b/rtc_base/logging.h
@@ -92,8 +92,7 @@
   // Compatibility aliases, to be deleted.
   // TODO(bugs.webrtc.org/13362): Remove usage and delete.
   INFO [[deprecated("Use LS_INFO")]] = LS_INFO,
-  // WARNING [[deprecated("Use LS_WARNING")]] = LS_WARNING,
-  WARNING = LS_WARNING,
+  WARNING [[deprecated("Use LS_WARNING")]] = LS_WARNING,
   LERROR [[deprecated("Use LS_ERROR")]] = LS_ERROR
 };
 
diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc
index 61acf54..33ebb69 100644
--- a/rtc_base/physical_socket_server.cc
+++ b/rtc_base/physical_socket_server.cc
@@ -1686,31 +1686,31 @@
             {
               if ((wsaEvents.lNetworkEvents & FD_READ) &&
                   wsaEvents.iErrorCode[FD_READ_BIT] != 0) {
-                RTC_LOG(WARNING)
+                RTC_LOG(LS_WARNING)
                     << "PhysicalSocketServer got FD_READ_BIT error "
                     << wsaEvents.iErrorCode[FD_READ_BIT];
               }
               if ((wsaEvents.lNetworkEvents & FD_WRITE) &&
                   wsaEvents.iErrorCode[FD_WRITE_BIT] != 0) {
-                RTC_LOG(WARNING)
+                RTC_LOG(LS_WARNING)
                     << "PhysicalSocketServer got FD_WRITE_BIT error "
                     << wsaEvents.iErrorCode[FD_WRITE_BIT];
               }
               if ((wsaEvents.lNetworkEvents & FD_CONNECT) &&
                   wsaEvents.iErrorCode[FD_CONNECT_BIT] != 0) {
-                RTC_LOG(WARNING)
+                RTC_LOG(LS_WARNING)
                     << "PhysicalSocketServer got FD_CONNECT_BIT error "
                     << wsaEvents.iErrorCode[FD_CONNECT_BIT];
               }
               if ((wsaEvents.lNetworkEvents & FD_ACCEPT) &&
                   wsaEvents.iErrorCode[FD_ACCEPT_BIT] != 0) {
-                RTC_LOG(WARNING)
+                RTC_LOG(LS_WARNING)
                     << "PhysicalSocketServer got FD_ACCEPT_BIT error "
                     << wsaEvents.iErrorCode[FD_ACCEPT_BIT];
               }
               if ((wsaEvents.lNetworkEvents & FD_CLOSE) &&
                   wsaEvents.iErrorCode[FD_CLOSE_BIT] != 0) {
-                RTC_LOG(WARNING)
+                RTC_LOG(LS_WARNING)
                     << "PhysicalSocketServer got FD_CLOSE_BIT error "
                     << wsaEvents.iErrorCode[FD_CLOSE_BIT];
               }
diff --git a/rtc_base/win/scoped_com_initializer.cc b/rtc_base/win/scoped_com_initializer.cc
index e791adc..4b56772 100644
--- a/rtc_base/win/scoped_com_initializer.cc
+++ b/rtc_base/win/scoped_com_initializer.cc
@@ -49,7 +49,7 @@
     RTC_DLOG(LS_INFO)
         << "The COM library was initialized successfully on this thread";
   } else if (hr_ == S_FALSE) {
-    RTC_DLOG(WARNING)
+    RTC_DLOG(LS_WARNING)
         << "The COM library is already initialized on this thread";
   }
 }
diff --git a/sdk/android/src/jni/audio_device/aaudio_player.cc b/sdk/android/src/jni/audio_device/aaudio_player.cc
index 29bcfae..ae8fcb9 100644
--- a/sdk/android/src/jni/audio_device/aaudio_player.cc
+++ b/sdk/android/src/jni/audio_device/aaudio_player.cc
@@ -158,7 +158,7 @@
   if (aaudio_.stream_state() == AAUDIO_STREAM_STATE_DISCONNECTED) {
     // The stream is disconnected and any attempt to use it will return
     // AAUDIO_ERROR_DISCONNECTED.
-    RTC_LOG(WARNING) << "Output stream disconnected";
+    RTC_LOG(LS_WARNING) << "Output stream disconnected";
     // AAudio documentation states: "You should not close or reopen the stream
     // from the callback, use another thread instead". A message is therefore
     // sent to the main thread to do the restart operation.
diff --git a/sdk/android/src/jni/audio_device/aaudio_recorder.cc b/sdk/android/src/jni/audio_device/aaudio_recorder.cc
index 8ab097d..d66c1d0 100644
--- a/sdk/android/src/jni/audio_device/aaudio_recorder.cc
+++ b/sdk/android/src/jni/audio_device/aaudio_recorder.cc
@@ -148,7 +148,7 @@
   if (aaudio_.stream_state() == AAUDIO_STREAM_STATE_DISCONNECTED) {
     // The stream is disconnected and any attempt to use it will return
     // AAUDIO_ERROR_DISCONNECTED..
-    RTC_LOG(WARNING) << "Input stream disconnected => restart is required";
+    RTC_LOG(LS_WARNING) << "Input stream disconnected => restart is required";
     // AAudio documentation states: "You should not close or reopen the stream
     // from the callback, use another thread instead". A message is therefore
     // sent to the main thread to do the restart operation.
diff --git a/sdk/android/src/jni/audio_device/aaudio_wrapper.cc b/sdk/android/src/jni/audio_device/aaudio_wrapper.cc
index 8fc8e78..6c20703 100644
--- a/sdk/android/src/jni/audio_device/aaudio_wrapper.cc
+++ b/sdk/android/src/jni/audio_device/aaudio_wrapper.cc
@@ -92,8 +92,8 @@
                    aaudio_result_t error) {
   RTC_DCHECK(user_data);
   AAudioWrapper* aaudio_wrapper = reinterpret_cast<AAudioWrapper*>(user_data);
-  RTC_LOG(WARNING) << "ErrorCallback: "
-                   << DirectionToString(aaudio_wrapper->direction());
+  RTC_LOG(LS_WARNING) << "ErrorCallback: "
+                      << DirectionToString(aaudio_wrapper->direction());
   RTC_DCHECK(aaudio_wrapper->observer());
   aaudio_wrapper->observer()->OnErrorCallback(error);
 }
diff --git a/sdk/android/src/jni/audio_device/audio_device_module.cc b/sdk/android/src/jni/audio_device/audio_device_module.cc
index 21c644f..2e75db9 100644
--- a/sdk/android/src/jni/audio_device/audio_device_module.cc
+++ b/sdk/android/src/jni/audio_device/audio_device_module.cc
@@ -454,7 +454,7 @@
     // to call this method if that same state is not modified.
     bool available = is_stereo_playout_supported_;
     if (enable != available) {
-      RTC_LOG(WARNING) << "changing stereo playout not supported";
+      RTC_LOG(LS_WARNING) << "changing stereo playout not supported";
       return -1;
     }
     return 0;
@@ -481,7 +481,7 @@
     // to call this method if that same state is not modified.
     bool available = is_stereo_record_supported_;
     if (enable != available) {
-      RTC_LOG(WARNING) << "changing stereo recording not supported";
+      RTC_LOG(LS_WARNING) << "changing stereo recording not supported";
       return -1;
     }
     return 0;
diff --git a/sdk/android/src/jni/audio_device/opensles_common.cc b/sdk/android/src/jni/audio_device/opensles_common.cc
index abc415d..300019a 100644
--- a/sdk/android/src/jni/audio_device/opensles_common.cc
+++ b/sdk/android/src/jni/audio_device/opensles_common.cc
@@ -113,7 +113,8 @@
   // If one already has been created, return existing object instead of
   // creating a new.
   if (engine_object_.Get() != nullptr) {
-    RTC_LOG(WARNING) << "The OpenSL ES engine object has already been created";
+    RTC_LOG(LS_WARNING)
+        << "The OpenSL ES engine object has already been created";
     return engine_object_.Get();
   }
   // Create the engine object in thread safe mode.
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 d0049c3..33ba926 100644
--- a/sdk/objc/native/src/audio/audio_device_module_ios.mm
+++ b/sdk/objc/native/src/audio/audio_device_module_ios.mm
@@ -291,7 +291,7 @@
     RTC_DLOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
     CHECKinitialized_();
     if (enable) {
-      RTC_LOG(WARNING) << "recording in stereo is not supported";
+      RTC_LOG(LS_WARNING) << "recording in stereo is not supported";
     }
     return -1;
   }
@@ -328,7 +328,7 @@
       return -1;
     }
     if (audio_device_->SetStereoPlayout(enable)) {
-      RTC_LOG(WARNING) << "stereo playout is not supported";
+      RTC_LOG(LS_WARNING) << "stereo playout is not supported";
       return -1;
     }
     int8_t nChannels(1);
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
index ab5cb54..da49d67 100644
--- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
+++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
@@ -289,7 +289,7 @@
 
   auto it = captured_frames_in_flight_.find(frame_id);
   if (it == captured_frames_in_flight_.end()) {
-    RTC_LOG(WARNING)
+    RTC_LOG(LS_WARNING)
         << "The encoding of video frame with id [" << frame_id << "] for peer ["
         << peer_name << "] finished after all receivers rendered this frame. "
         << "It can be OK for simulcast/SVC if higher quality stream is not "
@@ -427,9 +427,10 @@
         reason = kSkipRenderedFrameReasonDropped;
       }
     }
-    RTC_LOG(WARNING) << "Peer " << peer_name
-                     << "; Received frame out of order: received frame with id "
-                     << frame.id() << " which was " << reason << " before";
+    RTC_LOG(LS_WARNING)
+        << "Peer " << peer_name
+        << "; Received frame out of order: received frame with id "
+        << frame.id() << " which was " << reason << " before";
     return;
   }
 
diff --git a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc
index 669fcfe..0b9e2cd 100644
--- a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc
+++ b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc
@@ -34,8 +34,8 @@
     frames_in_flight_.insert(frame_id);
     frames_to_stream_label_.insert({frame_id, stream_label});
   } else {
-    RTC_LOG(WARNING) << "Meet new frame with the same id: " << frame_id
-                     << ". Assumes old one as dropped";
+    RTC_LOG(LS_WARNING) << "Meet new frame with the same id: " << frame_id
+                        << ". Assumes old one as dropped";
     // We needn't insert frame to frames_in_flight_, because it is already
     // there.
     ++frames_dropped_;
diff --git a/test/pc/e2e/test_activities_executor.cc b/test/pc/e2e/test_activities_executor.cc
index ded3992..68f6760 100644
--- a/test/pc/e2e/test_activities_executor.cc
+++ b/test/pc/e2e/test_activities_executor.cc
@@ -75,8 +75,8 @@
           ? TimeDelta::Zero()
           : activity.initial_delay_since_start - (Now() - start_time);
   if (remaining_delay < TimeDelta::Zero()) {
-    RTC_LOG(WARNING) << "Executing late task immediately, late by="
-                     << ToString(remaining_delay.Abs());
+    RTC_LOG(LS_WARNING) << "Executing late task immediately, late by="
+                        << ToString(remaining_delay.Abs());
     remaining_delay = TimeDelta::Zero();
   }