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/Activity | |
| parent | b0fd432126606d7008544ff0237beabc52109e02 (diff) | |
Use Microsoft.Extensions.Logging abstraction
Diffstat (limited to 'Emby.Server.Implementations/Activity')
3 files changed, 10 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs index e4b65b58d..3f7b907a9 100644 --- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs +++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs @@ -10,7 +10,7 @@ using MediaBrowser.Controller.Session; using MediaBrowser.Controller.Subtitles; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Events; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using MediaBrowser.Model.Tasks; using MediaBrowser.Model.Updates; using System; @@ -129,7 +129,7 @@ namespace Emby.Server.Implementations.Activity if (item == null) { - //_logger.Warn("PlaybackStopped reported with null media info."); + //_logger.LogWarning("PlaybackStopped reported with null media info."); return; } @@ -160,7 +160,7 @@ namespace Emby.Server.Implementations.Activity if (item == null) { - //_logger.Warn("PlaybackStart reported with null media info."); + //_logger.LogWarning("PlaybackStart reported with null media info."); return; } @@ -284,7 +284,7 @@ namespace Emby.Server.Implementations.Activity Name = string.Format(_localization.GetLocalizedString("FailedLoginAttemptWithUserName"), e.Argument.Username), Type = "AuthenticationFailed", ShortOverview = string.Format(_localization.GetLocalizedString("LabelIpAddressValue"), e.Argument.RemoteEndPoint), - Severity = LogSeverity.Error + Severity = LogLevel.Error }); } @@ -468,7 +468,7 @@ namespace Emby.Server.Implementations.Activity Type = NotificationType.TaskFailed.ToString(), Overview = string.Join(Environment.NewLine, vals.ToArray()), ShortOverview = runningTime, - Severity = LogSeverity.Error + Severity = LogLevel.Error }); } } diff --git a/Emby.Server.Implementations/Activity/ActivityManager.cs b/Emby.Server.Implementations/Activity/ActivityManager.cs index 047bebf23..b0c841397 100644 --- a/Emby.Server.Implementations/Activity/ActivityManager.cs +++ b/Emby.Server.Implementations/Activity/ActivityManager.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Events; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using MediaBrowser.Model.Querying; using System; using System.Linq; diff --git a/Emby.Server.Implementations/Activity/ActivityRepository.cs b/Emby.Server.Implementations/Activity/ActivityRepository.cs index 7f76d724b..a84d6d45f 100644 --- a/Emby.Server.Implementations/Activity/ActivityRepository.cs +++ b/Emby.Server.Implementations/Activity/ActivityRepository.cs @@ -6,7 +6,7 @@ using System.Linq; using Emby.Server.Implementations.Data; using MediaBrowser.Controller; using MediaBrowser.Model.Activity; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using MediaBrowser.Model.Querying; using SQLitePCL.pretty; using MediaBrowser.Model.Extensions; @@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Activity } catch (Exception ex) { - Logger.ErrorException("Error loading database file. Will reset and retry.", ex); + Logger.LogError("Error loading database file. Will reset and retry.", ex); FileSystem.DeleteFile(DbFilePath); @@ -73,7 +73,7 @@ namespace Emby.Server.Implementations.Activity } catch (Exception ex) { - Logger.ErrorException("Error migrating activity log database", ex); + Logger.LogError("Error migrating activity log database", ex); } } @@ -308,7 +308,7 @@ namespace Emby.Server.Implementations.Activity index++; if (reader[index].SQLiteType != SQLiteType.Null) { - info.Severity = (LogSeverity)Enum.Parse(typeof(LogSeverity), reader[index].ToString(), true); + info.Severity = (LogLevel)Enum.Parse(typeof(LogLevel), reader[index].ToString(), true); } return info; |
