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 /Mono.Nat/Pmp | |
| parent | b0fd432126606d7008544ff0237beabc52109e02 (diff) | |
Use Microsoft.Extensions.Logging abstraction
Diffstat (limited to 'Mono.Nat/Pmp')
| -rw-r--r-- | Mono.Nat/Pmp/PmpNatDevice.cs | 8 | ||||
| -rw-r--r-- | Mono.Nat/Pmp/PmpSearcher.cs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Mono.Nat/Pmp/PmpNatDevice.cs b/Mono.Nat/Pmp/PmpNatDevice.cs index dc0e2c89b5..99d030207b 100644 --- a/Mono.Nat/Pmp/PmpNatDevice.cs +++ b/Mono.Nat/Pmp/PmpNatDevice.cs @@ -32,7 +32,7 @@ using System.Threading; using System.Collections.Generic; using System.Threading.Tasks; using MediaBrowser.Model.Extensions; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; namespace Mono.Nat.Pmp { @@ -132,7 +132,7 @@ namespace Mono.Nat.Pmp mapping.Protocol, mapping.PrivatePort, e.Message); - _logger.Debug(message); + _logger.LogDebug(message); throw e; } @@ -183,7 +183,7 @@ namespace Mono.Nat.Pmp }; var errorMsg = errors[resultCode]; - _logger.Debug("Error in CreatePortMapListen: " + errorMsg); + _logger.LogDebug("Error in CreatePortMapListen: " + errorMsg); return; } @@ -198,7 +198,7 @@ namespace Mono.Nat.Pmp } catch (Exception ex) { - _logger.ErrorException("Error in CreatePortMapListen", ex); + _logger.LogError("Error in CreatePortMapListen", ex); return; } } diff --git a/Mono.Nat/Pmp/PmpSearcher.cs b/Mono.Nat/Pmp/PmpSearcher.cs index 180fb48d71..98cf37f147 100644 --- a/Mono.Nat/Pmp/PmpSearcher.cs +++ b/Mono.Nat/Pmp/PmpSearcher.cs @@ -37,7 +37,7 @@ using Mono.Nat.Pmp; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Threading.Tasks; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using System.Linq; namespace Mono.Nat @@ -208,7 +208,7 @@ namespace Mono.Nat return; int errorcode = IPAddress.NetworkToHostOrder(BitConverter.ToInt16(response, 2)); if (errorcode != 0) - _logger.Debug("Non zero error: {0}", errorcode); + _logger.LogDebug("Non zero error: {0}", errorcode); IPAddress publicIp = new IPAddress(new byte[] { response[8], response[9], response[10], response[11] }); nextSearch = DateTime.Now.AddMinutes(5); |
