Improve text logs in the network stack.
1) Network info is appended with its network ID assigned by the network
manager so that we can cross-reference networks by IDs in the log.
2) The local network info is added to the candidate pair string
representation so that we do not need the cross reference to the
logs of candidate gathering to find out the network where the local
candidate is from.
3) A flag is added to the candidate pair string representation to
indicate if this pair is the selected one.
4) Sorting of candidate pairs is logged with the reason of sorting
request.
5) Network filtering that takes place in the port allocator is
explicitly logged.
Bug: None
Change-Id: Iaa337394cad803515e26e254814aa04ed2213eab
Reviewed-on: https://webrtc-review.googlesource.com/72522
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23266}
diff --git a/rtc_base/network.cc b/rtc_base/network.cc
index 80b5b46..9433813 100644
--- a/rtc_base/network.cc
+++ b/rtc_base/network.cc
@@ -1041,7 +1041,7 @@
if (IsVpn()) {
ss << "/" << AdapterTypeToString(underlying_type_for_vpn_);
}
- ss << "]";
+ ss << ":id=" << id_ << "]";
return ss.str();
}