diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.WebRTC')
| -rw-r--r-- | Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs b/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs index 59784fa56..38e50d530 100644 --- a/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs +++ b/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; using Tango.Core; using Tango.Core.Threading; +using Tango.Logging; using Tango.Transport; using Tango.Transport.Adapters; using Tango.Transport.Compression; @@ -114,22 +115,22 @@ namespace Tango.WebRTC if (Mode == WebRtcTransportAdapterMode.Active) { - LogManager.Log($"{ComponentName}: Creating WebRTC offer..."); + LogManager.Log($"{ComponentName}: Creating WebRTC offer...", LogCategory.Debug); var offer = await _client.CreateOffer(); - LogManager.Log($"{ComponentName}: Sending WebRTC offer via signaling transporter..."); + LogManager.Log($"{ComponentName}: Sending WebRTC offer via signaling transporter...", LogCategory.Debug); var response = await SignalingTransporter.SendGenericRequest<OfferRequest, OfferResponse>(new OfferRequest() { Offer = offer }, new TransportRequestConfig() { Timeout = TimeSpan.FromSeconds(30), }); - LogManager.Log($"{ComponentName}: WebRTC offer sent and responded with an answer. Setting WebRTC answer..."); + LogManager.Log($"{ComponentName}: WebRTC offer sent and responded with an answer. Setting WebRTC answer...", LogCategory.Debug); _client.SetAnswer(response.Answer); _answerReceived = true; foreach (var ice in _queuedIceCandidates.ToList()) { - LogManager.Log($"{ComponentName}: Sending existing ice candidate '{ice.Sdp}'..."); + LogManager.Log($"{ComponentName}: Sending existing ice candidate '{ice.Sdp}'...", LogCategory.Debug); try { @@ -146,7 +147,7 @@ namespace Tango.WebRTC } else { - LogManager.Log($"{ComponentName}: Waiting for offer..."); + LogManager.Log($"{ComponentName}: Waiting for offer...", LogCategory.Debug); State = TransportComponentState.Connected; if (!completed) @@ -230,7 +231,7 @@ namespace Tango.WebRTC foreach (var ice in _queuedIceCandidates.ToList()) { - LogManager.Log($"{ComponentName}: Sending existing ice candidate '{ice.Sdp}'..."); + LogManager.Log($"{ComponentName}: Sending existing ice candidate '{ice.Sdp}'...", LogCategory.Debug); try { @@ -258,7 +259,7 @@ namespace Tango.WebRTC { if (_answerReceived) { - LogManager.Log($"{ComponentName}: New WebRTC candidate available. Sending ice to remote peer..."); + LogManager.Log($"{ComponentName}: New WebRTC candidate available. Sending ice to remote peer...", LogCategory.Debug); await SignalingTransporter.SendGenericRequest<IceCandidateRequest, IceCandidateResponse>(new IceCandidateRequest() { IceCandidate = e.IceCandidate }, new TransportRequestConfig() { @@ -269,11 +270,11 @@ namespace Tango.WebRTC { if (Mode == WebRtcTransportAdapterMode.Active) { - LogManager.Log($"{ComponentName}: New WebRTC candidate available. Will be sent after an answer is received..."); + LogManager.Log($"{ComponentName}: New WebRTC candidate available. Will be sent after an answer is received...", LogCategory.Debug); } else { - LogManager.Log($"{ComponentName}: New WebRTC candidate available. Will be sent after an offer is received..."); + LogManager.Log($"{ComponentName}: New WebRTC candidate available. Will be sent after an offer is received...", LogCategory.Debug); } _queuedIceCandidates.Add(e.IceCandidate); @@ -289,12 +290,12 @@ namespace Tango.WebRTC { try { - LogManager.Log($"{ComponentName}: Ice candidate request received from the remote peer."); + LogManager.Log($"{ComponentName}: Ice candidate request received from the remote peer.", LogCategory.Debug); await SignalingTransporter.SendGenericResponse(new IceCandidateResponse() { }, token); - LogManager.Log($"{ComponentName}: Adding ice candidate '{request.IceCandidate.Sdp}'..."); + LogManager.Log($"{ComponentName}: Adding ice candidate '{request.IceCandidate.Sdp}'...", LogCategory.Debug); _client.AddIceCandidate(request.IceCandidate); - LogManager.Log($"{ComponentName}: Ice candidate added."); + LogManager.Log($"{ComponentName}: Ice candidate added.", LogCategory.Debug); } catch (Exception ex) { |
