aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Udp/UdpServer.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2018-12-30 17:29:02 -0500
committerGitHub <noreply@github.com>2018-12-30 17:29:02 -0500
commit1f02cf4b7e13c932bc30968cbb74b71885fd3eb7 (patch)
tree2fbf2e570340765abd40b5ad8e491f1f212699c0 /Emby.Server.Implementations/Udp/UdpServer.cs
parent7ad023143062c1995178e5700961b553822bd5af (diff)
parent4c95aee52eda793d1e013164cc0fde9eb609f894 (diff)
Merge pull request #285 from Bond-009/logging
Use Serilog to handle logging
Diffstat (limited to 'Emby.Server.Implementations/Udp/UdpServer.cs')
-rw-r--r--Emby.Server.Implementations/Udp/UdpServer.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.cs
index f195ca710..8cacc1124 100644
--- a/Emby.Server.Implementations/Udp/UdpServer.cs
+++ b/Emby.Server.Implementations/Udp/UdpServer.cs
@@ -1,6 +1,6 @@
using MediaBrowser.Controller;
using MediaBrowser.Model.ApiClient;
-using MediaBrowser.Model.Logging;
+using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Serialization;
using System;
using System.Collections.Generic;
@@ -79,7 +79,7 @@ namespace Emby.Server.Implementations.Udp
}
catch (Exception ex)
{
- _logger.ErrorException("Error in OnMessageReceived", ex);
+ _logger.LogError(ex, "Error in OnMessageReceived");
}
}
}
@@ -127,7 +127,7 @@ namespace Emby.Server.Implementations.Udp
}
else
{
- _logger.Warn("Unable to respond to udp request because the local ip address could not be determined.");
+ _logger.LogWarning("Unable to respond to udp request because the local ip address could not be determined.");
}
}
@@ -171,7 +171,7 @@ namespace Emby.Server.Implementations.Udp
}
catch (Exception ex)
{
- _logger.ErrorException("Error receiving udp message", ex);
+ _logger.LogError(ex, "Error receiving udp message");
}
}
@@ -193,7 +193,7 @@ namespace Emby.Server.Implementations.Udp
}
catch (Exception ex)
{
- _logger.ErrorException("Error receiving udp message", ex);
+ _logger.LogError(ex, "Error receiving udp message");
}
BeginReceive();
@@ -224,7 +224,7 @@ namespace Emby.Server.Implementations.Udp
}
catch (Exception ex)
{
- _logger.ErrorException("Error handling UDP message", ex);
+ _logger.LogError(ex, "Error handling UDP message");
}
}
@@ -274,7 +274,7 @@ namespace Emby.Server.Implementations.Udp
{
await _udpClient.SendToAsync(bytes, 0, bytes.Length, remoteEndPoint, cancellationToken).ConfigureAwait(false);
- _logger.Info("Udp message sent to {0}", remoteEndPoint);
+ _logger.LogInformation("Udp message sent to {remoteEndPoint}", remoteEndPoint);
}
catch (OperationCanceledException)
{
@@ -282,7 +282,7 @@ namespace Emby.Server.Implementations.Udp
}
catch (Exception ex)
{
- _logger.ErrorException("Error sending message to {0}", ex, remoteEndPoint);
+ _logger.LogError(ex, "Error sending message to {remoteEndPoint}", remoteEndPoint);
}
}
}