add logging

This commit is contained in:
Luke Pulverenti
2016-06-30 19:17:49 -04:00
parent edfd04129e
commit 106087b685
9 changed files with 18 additions and 36 deletions

View File

@@ -80,6 +80,7 @@ namespace MediaBrowser.Common.Implementations.Serialization
/// <param name="file">The file.</param>
public void SerializeToFile(object obj, string file)
{
_logger.Info("Serializing to file {0}", file);
using (var stream = new FileStream(file, FileMode.Create))
{
SerializeToStream(obj, stream);
@@ -94,7 +95,7 @@ namespace MediaBrowser.Common.Implementations.Serialization
/// <returns>System.Object.</returns>
public object DeserializeFromFile(Type type, string file)
{
_logger.Debug("Deserializing file {0}", file);
_logger.Info("Deserializing file {0}", file);
using (var stream = _fileSystem.OpenRead(file))
{
return DeserializeFromStream(type, stream);