Add switch reason to verbose logging of SortAndSwitchConnection while this is already logged when actually switching, knowing why connections get sorted and evaluated may be useful. BUG=None Change-Id: I1449b0e1fb3624c04d7fb2730a05ffa7c7d1f37a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313100 Reviewed-by: Sameer Vijaykar <samvi@google.com> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Commit-Queue: Philipp Hancke <phancke@microsoft.com> Cr-Commit-Position: refs/heads/main@{#40521}
diff --git a/p2p/base/basic_ice_controller.cc b/p2p/base/basic_ice_controller.cc index 55f187c..a0ff4cf 100644 --- a/p2p/base/basic_ice_controller.cc +++ b/p2p/base/basic_ice_controller.cc
@@ -540,7 +540,8 @@ }); RTC_LOG(LS_VERBOSE) << "Sorting " << connections_.size() - << " available connections"; + << " available connections due to: " + << IceSwitchReasonToString(reason); for (size_t i = 0; i < connections_.size(); ++i) { RTC_LOG(LS_VERBOSE) << connections_[i]->ToString(); }