Use Microsoft.Extensions.Logging abstraction

This commit is contained in:
Bond_009
2018-12-13 14:18:25 +01:00
parent b0fd432126
commit 0f8b3c6347
310 changed files with 1421 additions and 2058 deletions

View File

@@ -3,7 +3,7 @@ using System.IO;
using System.Text;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Devices
{
@@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Devices
return value;
}
_logger.Error("Invalid value found in device id file");
_logger.LogError("Invalid value found in device id file");
}
}
catch (DirectoryNotFoundException)
@@ -45,7 +45,7 @@ namespace Emby.Server.Implementations.Devices
}
catch (Exception ex)
{
_logger.ErrorException("Error reading file", ex);
_logger.LogError("Error reading file", ex);
}
return null;
@@ -66,7 +66,7 @@ namespace Emby.Server.Implementations.Devices
}
catch (Exception ex)
{
_logger.ErrorException("Error writing to file", ex);
_logger.LogError("Error writing to file", ex);
}
}

View File

@@ -6,7 +6,7 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Devices;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Logging;
using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Session;
@@ -434,7 +434,7 @@ namespace Emby.Server.Implementations.Devices
}
catch (Exception ex)
{
_logger.ErrorException("Error creating camera uploads library", ex);
_logger.LogError("Error creating camera uploads library", ex);
}
_config.Configuration.CameraUploadUpgraded = true;