diff options
| author | Bond_009 <bond.009@outlook.com> | 2018-12-13 14:18:25 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2018-12-30 22:44:38 +0100 |
| commit | 0f8b3c634708ce8e7b2e2ae6fed87b6b943b5bca (patch) | |
| tree | 3b2440977592f46598ee1961199ec2c0fd3455ac /Emby.Server.Implementations/Networking/NetworkManager.cs | |
| parent | b0fd432126606d7008544ff0237beabc52109e02 (diff) | |
Use Microsoft.Extensions.Logging abstraction
Diffstat (limited to 'Emby.Server.Implementations/Networking/NetworkManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Networking/NetworkManager.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs index 4699b5bd4..7945680b3 100644 --- a/Emby.Server.Implementations/Networking/NetworkManager.cs +++ b/Emby.Server.Implementations/Networking/NetworkManager.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using MediaBrowser.Common.Net; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.IO; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using MediaBrowser.Model.Net; using MediaBrowser.Model.System; using System.Numerics; @@ -36,7 +36,7 @@ namespace Emby.Server.Implementations.Networking } catch (Exception ex) { - Logger.ErrorException("Error binding to NetworkAddressChanged event", ex); + Logger.LogError("Error binding to NetworkAddressChanged event", ex); } try @@ -45,20 +45,20 @@ namespace Emby.Server.Implementations.Networking } catch (Exception ex) { - Logger.ErrorException("Error binding to NetworkChange_NetworkAvailabilityChanged event", ex); + Logger.LogError("Error binding to NetworkChange_NetworkAvailabilityChanged event", ex); } } } private void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { - Logger.Debug("NetworkAvailabilityChanged"); + Logger.LogDebug("NetworkAvailabilityChanged"); OnNetworkChanged(); } private void NetworkChange_NetworkAddressChanged(object sender, EventArgs e) { - Logger.Debug("NetworkAddressChanged"); + Logger.LogDebug("NetworkAddressChanged"); OnNetworkChanged(); } @@ -189,7 +189,7 @@ namespace Emby.Server.Implementations.Networking foreach (var subnet_Match in subnets) { - //Logger.Debug("subnet_Match:" + subnet_Match); + //logger.LogDebug("subnet_Match:" + subnet_Match); if (endpoint.StartsWith(subnet_Match + ".", StringComparison.OrdinalIgnoreCase)) { @@ -355,13 +355,13 @@ namespace Emby.Server.Implementations.Networking try { var host = uri.DnsSafeHost; - Logger.Debug("Resolving host {0}", host); + Logger.LogDebug("Resolving host {0}", host); address = GetIpAddresses(host).Result.FirstOrDefault(); if (address != null) { - Logger.Debug("{0} resolved to {1}", host, address); + Logger.LogDebug("{0} resolved to {1}", host, address); return IsInLocalNetworkInternal(address.ToString(), false); } @@ -372,7 +372,7 @@ namespace Emby.Server.Implementations.Networking } catch (Exception ex) { - Logger.ErrorException("Error resovling hostname", ex); + Logger.LogError("Error resovling hostname", ex); } } } @@ -399,7 +399,7 @@ namespace Emby.Server.Implementations.Networking } catch (Exception ex) { - Logger.ErrorException("Error in GetAllNetworkInterfaces", ex); + Logger.LogError("Error in GetAllNetworkInterfaces", ex); return new List<IPAddress>(); } @@ -409,7 +409,7 @@ namespace Emby.Server.Implementations.Networking try { // suppress logging because it might be causing nas device wake up - //Logger.Debug("Querying interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus); + //logger.LogDebug("Querying interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus); var ipProperties = network.GetIPProperties(); @@ -428,7 +428,7 @@ namespace Emby.Server.Implementations.Networking } catch (Exception ex) { - Logger.ErrorException("Error querying network interface", ex); + Logger.LogError("Error querying network interface", ex); return new List<IPAddress>(); } |
