diff options
author | Jonas Olsson <jonasolsson@webrtc.org> | 2018-03-28 09:47:51 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-03-29 08:21:27 +0000 |
commit | d7d762d08d690f741942528e62b4a759a520c390 (patch) | |
tree | cdd0130f27f5bec8bf51b63c9bee1aa887993e36 /p2p/client/basicportallocator.cc | |
parent | c99dc31501c5697483248d06b1568b11c8afa7ba (diff) | |
download | webrtc-d7d762d08d690f741942528e62b4a759a520c390.tar.gz |
Remove LOG_J and LOG_JV, tweak p2p logs.
Bug: webrtc:9077
Change-Id: I54ecf10592add33692fc6e694c2f10a646e81345
Reviewed-on: https://webrtc-review.googlesource.com/56142
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22667}
Diffstat (limited to 'p2p/client/basicportallocator.cc')
-rw-r--r-- | p2p/client/basicportallocator.cc | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/p2p/client/basicportallocator.cc b/p2p/client/basicportallocator.cc index 01acf42cdd..1b3947b6cf 100644 --- a/p2p/client/basicportallocator.cc +++ b/p2p/client/basicportallocator.cc @@ -17,7 +17,6 @@ #include "api/umametrics.h" #include "p2p/base/basicpacketsocketfactory.h" -#include "p2p/base/common.h" #include "p2p/base/port.h" #include "p2p/base/relayport.h" #include "p2p/base/stunport.h" @@ -843,7 +842,8 @@ void BasicPortAllocatorSession::AddAllocatedPort(Port* port, &BasicPortAllocatorSession::OnPortDestroyed); port->SignalPortError.connect( this, &BasicPortAllocatorSession::OnPortError); - LOG_J(LS_INFO, port) << "Added port to allocator"; + RTC_LOG(LS_INFO) << port->ToString() + << ": Added port to allocator"; if (prepare_address) port->PrepareAddress(); @@ -860,7 +860,8 @@ void BasicPortAllocatorSession::OnCandidateReady( RTC_DCHECK(rtc::Thread::Current() == network_thread_); PortData* data = FindPort(port); RTC_DCHECK(data != NULL); - LOG_J(LS_INFO, port) << "Gathered candidate: " << c.ToSensitiveString(); + RTC_LOG(LS_INFO) << port->ToString() + << ": Gathered candidate: " << c.ToSensitiveString(); // Discarding any candidate signal if port allocation status is // already done with gathering. if (!data->inprogress()) { @@ -887,7 +888,7 @@ void BasicPortAllocatorSession::OnCandidateReady( } // If the current port is not pruned yet, SignalPortReady. if (!data->pruned()) { - LOG_J(LS_INFO, port) << "Port ready."; + RTC_LOG(LS_INFO) << port->ToString() << ": Port ready."; SignalPortReady(this, port); port->KeepAliveUntilPruned(); } @@ -961,7 +962,8 @@ void BasicPortAllocatorSession::PruneAllPorts() { void BasicPortAllocatorSession::OnPortComplete(Port* port) { RTC_DCHECK(rtc::Thread::Current() == network_thread_); - LOG_J(LS_INFO, port) << "Port completed gathering candidates."; + RTC_LOG(LS_INFO) << port->ToString() + << ": Port completed gathering candidates."; PortData* data = FindPort(port); RTC_DCHECK(data != NULL); @@ -978,7 +980,8 @@ void BasicPortAllocatorSession::OnPortComplete(Port* port) { void BasicPortAllocatorSession::OnPortError(Port* port) { RTC_DCHECK(rtc::Thread::Current() == network_thread_); - LOG_J(LS_INFO, port) << "Port encountered error while gathering candidates."; + RTC_LOG(LS_INFO) << port->ToString() + << ": Port encountered error while gathering candidates."; PortData* data = FindPort(port); RTC_DCHECK(data != NULL); // We might have already given up on this port and stopped it. @@ -1069,8 +1072,9 @@ void BasicPortAllocatorSession::OnPortDestroyed( iter != ports_.end(); ++iter) { if (port == iter->port()) { ports_.erase(iter); - LOG_J(LS_INFO, port) << "Removed port from allocator (" - << static_cast<int>(ports_.size()) << " remaining)"; + RTC_LOG(LS_INFO) << port->ToString() + << ": Removed port from allocator (" + << static_cast<int>(ports_.size()) << " remaining)"; return; } } @@ -1251,8 +1255,8 @@ void AllocationSequence::OnMessage(rtc::Message* msg) { const char* const PHASE_NAMES[kNumPhases] = {"Udp", "Relay", "Tcp"}; // Perform all of the phases in the current step. - LOG_J(LS_INFO, network_) << "Allocation Phase=" - << PHASE_NAMES[phase_]; + RTC_LOG(LS_INFO) << network_->ToString() + << ": Allocation Phase=" << PHASE_NAMES[phase_]; switch (phase_) { case PHASE_UDP: @@ -1324,7 +1328,7 @@ void AllocationSequence::CreateUDPPorts() { if (config_ && !config_->StunServers().empty()) { RTC_LOG(LS_INFO) << "AllocationSequence: UDPPort will be handling the " - << "STUN candidate generation."; + "STUN candidate generation."; port->set_server_addresses(config_->StunServers()); } } @@ -1455,7 +1459,7 @@ void AllocationSequence::CreateTurnPort(const RelayServerConfig& config) { if (server_ip_family != AF_UNSPEC && server_ip_family != local_ip_family) { RTC_LOG(LS_INFO) << "Server and local address families are not compatible. " - << "Server address: " << relay_port->address.ipaddr().ToString() + "Server address: " << relay_port->address.ipaddr().ToString() << " Local address: " << network_->GetBestIP().ToString(); continue; } |