diff options
Diffstat (limited to 'Emby.Server.Implementations/Udp/UdpServer.cs')
| -rw-r--r-- | Emby.Server.Implementations/Udp/UdpServer.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.cs index f195ca710..275bd83ea 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; @@ -40,6 +40,7 @@ namespace Emby.Server.Implementations.Udp _json = json; _socketFactory = socketFactory; + AddMessageResponder("who is JellyfinServer?", true, RespondToV2Message); AddMessageResponder("who is EmbyServer?", true, RespondToV2Message); AddMessageResponder("who is MediaBrowserServer_v2?", false, RespondToV2Message); } @@ -79,7 +80,7 @@ namespace Emby.Server.Implementations.Udp } catch (Exception ex) { - _logger.ErrorException("Error in OnMessageReceived", ex); + _logger.LogError(ex, "Error in OnMessageReceived"); } } } @@ -127,7 +128,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 +172,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 +194,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 +225,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 +275,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 +283,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); } } } |
