mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
update logging
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Collections.Concurrent;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
|
||||
namespace MediaBrowser.Common.Implementations.Serialization
|
||||
{
|
||||
@@ -12,12 +13,14 @@ namespace MediaBrowser.Common.Implementations.Serialization
|
||||
/// </summary>
|
||||
public class XmlSerializer : IXmlSerializer
|
||||
{
|
||||
private IFileSystem _fileSystem;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public XmlSerializer(IFileSystem fileSystem)
|
||||
{
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
public XmlSerializer(IFileSystem fileSystem, ILogger logger)
|
||||
{
|
||||
_fileSystem = fileSystem;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
// Need to cache these
|
||||
// http://dotnetcodebox.blogspot.com/2013/01/xmlserializer-class-may-result-in.html
|
||||
@@ -91,6 +94,7 @@ namespace MediaBrowser.Common.Implementations.Serialization
|
||||
/// <returns>System.Object.</returns>
|
||||
public object DeserializeFromFile(Type type, string file)
|
||||
{
|
||||
_logger.Debug("Deserializing file {0}", file);
|
||||
using (var stream = _fileSystem.OpenRead(file))
|
||||
{
|
||||
return DeserializeFromStream(type, stream);
|
||||
|
||||
Reference in New Issue
Block a user