diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-01-01 11:47:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-01 11:47:57 -0800 |
| commit | 443218e3f109cdfbffa8c8c5d30e09e3ba5c2285 (patch) | |
| tree | 6de8dee799eebba514bac0b6eac457b4c0137978 /Emby.Notifications/NotificationManager.cs | |
| parent | 0c52f448a0c6d5cd3c5cce597fcf3ad9582c90f1 (diff) | |
| parent | cff0ece07329bbfa05fd22fbde444d09aaeb9a5c (diff) | |
Merge pull request #4 from jellyfin/dev
Dev
Diffstat (limited to 'Emby.Notifications/NotificationManager.cs')
| -rw-r--r-- | Emby.Notifications/NotificationManager.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Notifications/NotificationManager.cs b/Emby.Notifications/NotificationManager.cs index bb348d267..fa8fdd9c1 100644 --- a/Emby.Notifications/NotificationManager.cs +++ b/Emby.Notifications/NotificationManager.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Notifications; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using MediaBrowser.Model.Notifications; using System; using System.Collections.Generic; @@ -25,11 +25,11 @@ namespace Emby.Notifications private INotificationService[] _services; private INotificationTypeFactory[] _typeFactories; - public NotificationManager(ILogManager logManager, IUserManager userManager, IServerConfigurationManager config) + public NotificationManager(ILoggerFactory loggerFactory, IUserManager userManager, IServerConfigurationManager config) { _userManager = userManager; _config = config; - _logger = logManager.GetLogger(GetType().Name); + _logger = loggerFactory.CreateLogger(GetType().Name); } private NotificationOptions GetConfiguration() @@ -126,7 +126,7 @@ namespace Emby.Notifications User = user }; - _logger.Debug("Sending notification via {0} to user {1}", service.Name, user.Name); + _logger.LogDebug("Sending notification via {0} to user {1}", service.Name, user.Name); try { @@ -134,7 +134,7 @@ namespace Emby.Notifications } catch (Exception ex) { - _logger.ErrorException("Error sending notification to {0}", ex, service.Name); + _logger.LogError(ex, "Error sending notification to {0}", service.Name); } } @@ -146,7 +146,7 @@ namespace Emby.Notifications } catch (Exception ex) { - _logger.ErrorException("Error in IsEnabledForUser", ex); + _logger.LogError(ex, "Error in IsEnabledForUser"); return false; } } @@ -177,7 +177,7 @@ namespace Emby.Notifications } catch (Exception ex) { - _logger.ErrorException("Error in GetNotificationTypes", ex); + _logger.LogError(ex, "Error in GetNotificationTypes"); return new List<NotificationTypeInfo>(); } |
