From 4f51b34ab808656fc730180e8dcc44720d579dc4 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Tue, 25 Jul 2023 16:56:44 +0200 Subject: [PATCH] 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 Reviewed-by: Jonas Oreland Commit-Queue: Philipp Hancke Cr-Commit-Position: refs/heads/main@{#40521} --- p2p/base/basic_ice_controller.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p2p/base/basic_ice_controller.cc b/p2p/base/basic_ice_controller.cc index 55f187cb9a..a0ff4cf144 100644 --- a/p2p/base/basic_ice_controller.cc +++ b/p2p/base/basic_ice_controller.cc @@ -540,7 +540,8 @@ BasicIceController::SortAndSwitchConnection(IceSwitchReason reason) { }); 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(); }