aboutsummaryrefslogtreecommitdiff
path: root/Emby.Notifications
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Notifications')
-rw-r--r--Emby.Notifications/NotificationManager.cs14
-rw-r--r--Emby.Notifications/Notifications.cs4
2 files changed, 9 insertions, 9 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>();
}
diff --git a/Emby.Notifications/Notifications.cs b/Emby.Notifications/Notifications.cs
index 5725d1ba1..101f9706c 100644
--- a/Emby.Notifications/Notifications.cs
+++ b/Emby.Notifications/Notifications.cs
@@ -8,7 +8,7 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Notifications;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Session;
-using MediaBrowser.Model.Logging;
+using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Notifications;
using MediaBrowser.Model.Tasks;
using System;
@@ -273,7 +273,7 @@ namespace Emby.Notifications
}
catch (Exception ex)
{
- _logger.ErrorException("Error sending notification", ex);
+ _logger.LogError(ex, "Error sending notification");
}
}