aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2018-12-30 17:29:02 -0500
committerGitHub <noreply@github.com>2018-12-30 17:29:02 -0500
commit1f02cf4b7e13c932bc30968cbb74b71885fd3eb7 (patch)
tree2fbf2e570340765abd40b5ad8e491f1f212699c0 /Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs
parent7ad023143062c1995178e5700961b553822bd5af (diff)
parent4c95aee52eda793d1e013164cc0fde9eb609f894 (diff)
Merge pull request #285 from Bond-009/logging
Use Serilog to handle logging
Diffstat (limited to 'Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs')
-rw-r--r--Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs
index 385b4bd51..fddf19893 100644
--- a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs
+++ b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs
@@ -9,7 +9,7 @@ using MediaBrowser.Common.Events;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.IO;
-using MediaBrowser.Model.Logging;
+using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Serialization;
namespace Emby.Server.Implementations.AppBase
@@ -97,14 +97,14 @@ namespace Emby.Server.Implementations.AppBase
/// Initializes a new instance of the <see cref="BaseConfigurationManager" /> class.
/// </summary>
/// <param name="applicationPaths">The application paths.</param>
- /// <param name="logManager">The log manager.</param>
+ /// <param name="loggerFactory">The logger factory.</param>
/// <param name="xmlSerializer">The XML serializer.</param>
- protected BaseConfigurationManager(IApplicationPaths applicationPaths, ILogManager logManager, IXmlSerializer xmlSerializer, IFileSystem fileSystem)
+ protected BaseConfigurationManager(IApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IXmlSerializer xmlSerializer, IFileSystem fileSystem)
{
CommonApplicationPaths = applicationPaths;
XmlSerializer = xmlSerializer;
FileSystem = fileSystem;
- Logger = logManager.GetLogger(GetType().Name);
+ Logger = loggerFactory.CreateLogger(GetType().Name);
UpdateCachePath();
}
@@ -123,7 +123,7 @@ namespace Emby.Server.Implementations.AppBase
/// </summary>
public void SaveConfiguration()
{
- Logger.Info("Saving system configuration");
+ Logger.LogInformation("Saving system configuration");
var path = CommonApplicationPaths.SystemConfigurationFilePath;
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(path));
@@ -259,7 +259,7 @@ namespace Emby.Server.Implementations.AppBase
}
catch (Exception ex)
{
- Logger.ErrorException("Error loading configuration file: {0}", ex, path);
+ Logger.LogError(ex, "Error loading configuration file: {path}", path);
return Activator.CreateInstance(configurationType);
}